# kernel 3 macbook pro 8,2 display

## alvinwu

I'm using macbook pro 8,2, and like to share with you about various problems.

1. broadcom bcm4331 wireless card still not work;

2. efi boot with radeon bios patch from file (/lib/firmware/radoen/vbios.bin) works on linux-3.1.0-git3, but crashes with newer kernels;

3. sd card works only with a Ehternet RJ45 cable is plugged, otherwise didn't work with "timeout" dmesg log;

4. i915 driver fails as well;

5. brightness control didn't work.

Anyone can share your fixes?

----------

## alvinwu

The error log message follows:

--------------------START--------------------------

Aug 25 08:37:13 [kernel] applesmc: MO_X: read data fail

Aug 25 08:37:14 [kernel] applesmc: MO_Y: read data fail

Aug 25 08:38:03 [kernel] [Hardware Error]: Machine check events logged

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0: GPU lockup CP stall for more than 10000msec

Aug 25 08:39:36 [kernel] ------------[ cut here ]------------

Aug 25 08:39:36 [kernel] WARNING: at drivers/gpu/drm/radeon/radeon_fence.c:267 0xffffffffa045b37b()

Aug 25 08:39:36 [kernel] Hardware name: MacBookPro8,2

Aug 25 08:39:36 [kernel] GPU lockup (waiting for 0x00017B4D last fence id 0x00017B4C)

Aug 25 08:39:36 [kernel] Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ipv6 isight_firmware snd_firewire_speakers sn

d_firewire_lib nls_cp950 nls_cp936 shpchp pci_hotplug thermal coretemp fan acpi_pad acpi_cpufreq mperf rtc snd_hda_codec_hdmi snd_hda_codec_cirrus radeon uvcvideo snd_hd

a_intel ttm videodev drm_kms_helper snd_hda_codec v4l2_compat_ioctl32 drm agpgart mei(C) snd_hwdep i2c_i801 i2c_algo_bit sdhci_pci sdhci applesmc snd_pcm snd_timer snd i

TCO_wdt soundcore snd_page_alloc firewire_ohci firewire_core i2c_core pcspkr video processor input_polldev ac battery button bcma apple_bl aesni_intel cryptd aes_x86_64 

aes_generic ecb btusb bluetooth joydev evdev bcm5974 rfkill mac_hid iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi tg3 libphy e1000 fuse nfs auth_rpcgss lockd sunr

pc jfs dm_snapshot dm_crypt dm_mirror dm_region_hash dm_log dm_mod scsi_wait_scan hid_logitech hid_cypress hid_chicony hid_apple hid_a4tech sl811_hcd usbhid ohci_hcd ssb

 pcmcia firmware_class pcmcia_core uhci_hcd usb_storage ehci_hcd usbcore mptsas scsi_transport_sas mptfc scsi_transport_fc mptspi scsi_transport_spi mptscsih mptbase gdt

h sr_mod cdrom sg sd_mod sata_mv ata_piix ahci libahci sata_sil24 pata_platform libata scsi_mod

Aug 25 08:39:36 [kernel] Pid: 7513, comm: Xorg Tainted: G         C  3.1.0-rc3-git1 #1

Aug 25 08:39:36 [kernel] Call Trace:

Aug 25 08:39:36 [kernel]  [<ffffffff8104a05a>] 0xffffffff8104a05a

Aug 25 08:39:36 [kernel]  [<ffffffff8104a131>] 0xffffffff8104a131

Aug 25 08:39:36 [kernel]  [<ffffffffa045b37b>] 0xffffffffa045b37b

Aug 25 08:39:36 [kernel]  [<ffffffff81067210>] ? 0xffffffff81067210

Aug 25 08:39:36 [kernel]  [<ffffffffa0475a80>] 0xffffffffa0475a80

Aug 25 08:39:36 [kernel]  [<ffffffffa0477373>] 0xffffffffa0477373

Aug 25 08:39:36 [kernel]  [<ffffffffa0475263>] ? 0xffffffffa0475263

Aug 25 08:39:36 [kernel]  [<ffffffffa03b2134>] 0xffffffffa03b2134

Aug 25 08:39:36 [kernel]  [<ffffffffa04772e0>] ? 0xffffffffa04772e0

Aug 25 08:39:36 [kernel]  [<ffffffff811196b6>] 0xffffffff811196b6

Aug 25 08:39:36 [kernel]  [<ffffffff81119c01>] 0xffffffff81119c01

Aug 25 08:39:36 [kernel]  [<ffffffff81596252>] 0xffffffff81596252

Aug 25 08:39:36 [kernel] ---[ end trace da2b4560bc38e069 ]---

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0: GPU softreset 

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS=0xF5703828

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE0=0xFC000007

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE1=0x00000007

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   SRBM_STATUS=0x200006C0

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0: Wait for MC idle timedout !

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_SOFT_RESET=0x00007F6B

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS=0x00003828

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE0=0x00000007

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE1=0x00000007

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0:   SRBM_STATUS=0x200006C0

Aug 25 08:39:36 [kernel] radeon 0000:01:00.0: GPU reset succeed

Aug 25 08:39:37 [kernel] radeon 0000:01:00.0: Wait for MC idle timedout !

                - Last output repeated twice -

Aug 25 08:39:37 [kernel] radeon 0000:01:00.0: WB enabled

Aug 25 08:39:37 [kernel] [drm] ring test succeeded in 0 usecs

Aug 25 08:39:37 [kernel] [drm] ib test succeeded in 1 usecs

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0: GPU lockup CP stall for more than 10000msec

Aug 25 08:39:53 [kernel] ------------[ cut here ]------------

Aug 25 08:39:53 [kernel] WARNING: at drivers/gpu/drm/radeon/radeon_fence.c:267 0xffffffffa045b37b()

Aug 25 08:39:53 [kernel] Hardware name: MacBookPro8,2

Aug 25 08:39:53 [kernel] GPU lockup (waiting for 0x00017B4F last fence id 0x00017B4D)

Aug 25 08:39:53 [kernel] Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ipv6 isight_firmware snd_firewire_speakers snd_firewire_lib nls_cp950 nls_cp936 shpchp pci_hotplug thermal coretemp fan acpi_pad acpi_cpufreq mperf rtc snd_hda_codec_hdmi snd_hda_codec_cirrus radeon uvcvideo snd_hda_intel ttm videodev drm_kms_helper snd_hda_codec v4l2_compat_ioctl32 drm agpgart mei(C) snd_hwdep i2c_i801 i2c_algo_bit sdhci_pci sdhci applesmc snd_pcm snd_timer snd iTCO_wdt soundcore snd_page_alloc firewire_ohci firewire_core i2c_core pcspkr video processor input_polldev ac battery button bcma apple_bl aesni_intel cryptd aes_x86_64 aes_generic ecb btusb bluetooth joydev evdev bcm5974 rfkill mac_hid iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi tg3 libphy e1000 fuse nfs auth_rpcgss lockd sunrpc jfs dm_snapshot dm_crypt dm_mirror dm_region_hash dm_log dm_mod scsi_wait_scan hid_logitech hid_cypress hid_chicony hid_apple hid_a4tech sl811_hcd usbhid ohci_hcd ssb pcmcia firmware_class pcmcia_core uhci_hcd usb_storage ehci_hcd usbcore mptsas scsi_transport_sas mptfc scsi_transport_fc mptspi scsi_transport_spi mptscsih mptbase gdth sr_mod cdrom sg sd_mod sata_mv ata_piix ahci libahci sata_sil24 pata_platform libata scsi_mod

Aug 25 08:39:53 [kernel] Pid: 7513, comm: Xorg Tainted: G        WC  3.1.0-rc3-git1 #1

Aug 25 08:39:53 [kernel] Call Trace:

Aug 25 08:39:53 [kernel]  [<ffffffff8104a05a>] 0xffffffff8104a05a

Aug 25 08:39:53 [kernel]  [<ffffffff8104a131>] 0xffffffff8104a131

Aug 25 08:39:53 [kernel]  [<ffffffffa045b37b>] 0xffffffffa045b37b

Aug 25 08:39:53 [kernel]  [<ffffffff81067210>] ? 0xffffffff81067210

Aug 25 08:39:53 [kernel]  [<ffffffffa0475a80>] 0xffffffffa0475a80

Aug 25 08:39:53 [kernel]  [<ffffffffa0477373>] 0xffffffffa0477373

Aug 25 08:39:53 [kernel]  [<ffffffffa03b2134>] 0xffffffffa03b2134

Aug 25 08:39:53 [kernel]  [<ffffffffa04772e0>] ? 0xffffffffa04772e0

Aug 25 08:39:53 [kernel]  [<ffffffff811196b6>] 0xffffffff811196b6

Aug 25 08:39:53 [kernel]  [<ffffffff81119c01>] 0xffffffff81119c01

Aug 25 08:39:53 [kernel]  [<ffffffff81596252>] 0xffffffff81596252

Aug 25 08:39:53 [kernel] ---[ end trace da2b4560bc38e06a ]---

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0: GPU softreset 

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS=0xA0003828

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE0=0x00000007

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE1=0x00000007

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   SRBM_STATUS=0x200206C0

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0: Wait for MC idle timedout !

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_SOFT_RESET=0x00007F6B

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS=0x00003828

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE0=0x00000007

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   GRBM_STATUS_SE1=0x00000007

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0:   SRBM_STATUS=0x200206C0

Aug 25 08:39:53 [kernel] radeon 0000:01:00.0: GPU reset succeed

Aug 25 08:39:54 [kernel] radeon 0000:01:00.0: Wait for MC idle timedout !

                - Last output repeated twice -

Aug 25 08:39:54 [kernel] radeon 0000:01:00.0: WB enabled

Aug 25 08:39:55 [kernel] [drm:r600_ring_test] *ERROR* radeon: ring test failed (scratch(0x8504)=0xCAFEDEAD)

Aug 25 08:39:55 [kernel] [drm:evergreen_resume] *ERROR* evergreen startup failed on resume

Aug 25 08:39:55 [kernel] [drm:radeon_ib_schedule] *ERROR* radeon: couldn't schedule IB(14).

Aug 25 08:39:55 [kernel] [drm:radeon_cs_ioctl] *ERROR* Failed to schedule IB !

Aug 25 08:40:05 [kernel] radeon 0000:01:00.0: GPU lockup CP stall for more than 10000msec

Aug 25 08:40:05 [kernel] ------------[ cut here ]------------

Aug 25 08:40:05 [kernel] WARNING: at drivers/gpu/drm/radeon/radeon_fence.c:267 0xffffffffa045b37b()

Aug 25 08:40:05 [kernel] Hardware name: MacBookPro8,2

Aug 25 08:40:05 [kernel] GPU lockup (waiting for 0x00017B50 last fence id 0x00017B4F)

---------------------------------------------END-----------------------------------------------------------

Then, I have to reboot the machine....

BTW, sometimes I can switch to the console after the display crashed for several minutes...

----------

## alvinwu

Very interesting, when I manually unload the following modules, the SD card reader can mount the device without plug in the LAN cable:

rmmod e1000

rmmod tg3

Following dmesg displays:

-------------------------START-------------------------------

mmc0: Timeout waiting for hardware interrupt.

sdhci: =========== REGISTER DUMP (mmc0)===========

sdhci: Sys addr: 0x00000000 | Version:  0x00001502

sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000

sdhci: Argument: 0x80000c08 | Trn mode: 0x00000000

sdhci: Present:  0x1eff0001 | Host ctl: 0x00000005

sdhci: Power:    0x0000000f | Blk gap:  0x00000000

sdhci: Wake-up:  0x00000000 | Clock:    0x0000fa07

sdhci: Timeout:  0x00000000 | Int stat: 0x00000000

sdhci: Int enab: 0x00ff0083 | Sig enab: 0x00ff0083

sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000

sdhci: Caps:     0x176ec8b0 | Caps_1:   0x03002177

sdhci: Cmd:      0x0000341a | Max curr: 0x00000000

sdhci: Host ctl2: 0x00000000

sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000

sdhci: ===========================================

mmc0: new SDHC card at address 1234

mmcblk0: mmc0:1234 SA04G 3.65 GiB 

 mmcblk0: p1

tg3 0000:02:00.0: PME# enabled

tg3 0000:02:00.0: wake-up capability enabled by ACPI

tg3 0000:02:00.0: PCI INT A disabled

-------------------------------------END-------------------------------------------

Looks like some kernel config regarding "interrupts" may change this behaviour.

----------

## alvinwu

Now I have a relatively stable Gnome3 desktop environment with some minor issues.

1. The only two kernel version that the MBP8,2 won't freeze are (grub2 efi boot via rEFIT):

     a) git-sources-3.1-rc2-r3

     b) git-sources-3.1-rc6

     both need to apply the "radeon bios read from file" patch..

2. Still cannot adjust brightness via the FN1 FN2 keys, now the /sys/class/backlight/  directory is empty. I have to boot OSX, adjust the brightness level, then reboot into Linux;

3. Again, resume from suspend will set the LCD brightness to the highest; 

4. After I upgrade the EFI firmware (under OSX) today. The SD card reader fails to read the card even though I connect the LAN cable. The system mount the device /dev/mmcblk0 but then waits forever, I cannot access the file contents..... NOTE: I have to rmmod sdhci-pci, then modprobe sdhci-pci before that /dev/mmcblk0 being mounted. And, dmesg shows dump msg about sdhci_irq, --> irq 17 disabled; I notice that several components also using irq 17; I try kernel option "irqpoll" with no luck;

5. I shall test later for the wireless card bcm4331. 

6. External monitor works fine;

7. Still unable to let the IGU i915 work, the screen freeze when ever I modprobe i915, with or without lvds patches...but the system is still running;

----------

## chloubs

i got somes patchs from internet or modify somes myself .... my macbook pro 8.2 is working well now , exept for b43 driver (suspend dont work)

take a look: perhaps you have to change ids according to your macbook (use dmidecode)

(sorry for my bad english  :Wink:  )

```

--- linux-3.1-rc5/drivers/hwmon/applesmc.c   2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/hwmon/applesmc.c   2011-09-11 09:26:07.486790791 +0200

@@ -1223,7 +1223,7 @@

 {

    int ret;

 

-   if (!dmi_check_system(applesmc_whitelist)) {

+   if (0 && !dmi_check_system(applesmc_whitelist)) {

       pr_warn("supported laptop not found!\n");

       ret = -ENODEV;

       goto out;

```

```

--- linux-3.1-rc5/drivers/hid/hid-core.c   2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/hid/hid-core.c   2011-09-11 17:19:06.050071392 +0200

@@ -1340,6 +1340,9 @@

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS) },

@@ -1892,6 +1895,9 @@

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },

    { }

```

```

--- linux-3.1-rc5/drivers/gpu/drm/radeon/radeon_bios.c   2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/gpu/drm/radeon/radeon_bios.c   2011-09-10 19:34:10.166678956 +0200

@@ -29,6 +29,7 @@

 #include "radeon_reg.h"

 #include "radeon.h"

 #include "atom.h"

+#include <linux/firmware.h>

 

 #include <linux/vga_switcheroo.h>

 #include <linux/slab.h>

@@ -56,6 +57,7 @@

    vram_base = pci_resource_start(rdev->pdev, 0);

    bios = ioremap(vram_base, size);

    if (!bios) {

+      DRM_ERROR("No bios\n");

       return false;

    }

 

@@ -65,6 +67,7 @@

    }

    rdev->bios = kmalloc(size, GFP_KERNEL);

    if (rdev->bios == NULL) {

+      DRM_ERROR("alloc fail\n");

       iounmap(bios);

       return false;

    }

@@ -73,6 +76,41 @@

    return true;

 }

 

+static bool radeon_read_bios_from_firmware(struct radeon_device *rdev)

+{

+   const uint8_t __iomem *bios;

+   resource_size_t size;

+   const struct firmware *fw = NULL;

+

+   request_firmware(&fw, "radeon/vbios.bin", rdev->dev);

+   if (!fw) {

+      DRM_ERROR("No bios\n");

+      return false;

+   }

+   size = fw->size;

+   bios = fw->data;

+

+   if (!bios) {

+      DRM_ERROR("No bios\n");

+      return false;

+   }

+

+   if (size == 0 || bios[0] != 0x55 || bios[1] != 0xaa) {

+      DRM_ERROR("wrong sig\n");

+      release_firmware(fw);

+      return false;

+   }

+   rdev->bios = kmalloc(size, GFP_KERNEL);

+   if (rdev->bios == NULL) {

+      DRM_ERROR("alloc fail\n");

+      release_firmware(fw);

+      return false;

+   }

+   memcpy(rdev->bios, bios, size);

+   release_firmware(fw);

+   return true;

+}

+

 static bool radeon_read_bios(struct radeon_device *rdev)

 {

    uint8_t __iomem *bios;

@@ -489,6 +527,9 @@

       r = radeon_read_bios(rdev);

    if (r == false) {

       r = radeon_read_disabled_bios(rdev);

+      if (r == false) {

+         r = radeon_read_bios_from_firmware(rdev);

+      }

    }

    if (r == false || rdev->bios == NULL) {

       DRM_ERROR("Unable to locate a BIOS ROM\n");

```

```

--- linux-3.1-rc5/drivers/hid/hid-apple.c   2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/hid/hid-apple.c   2011-09-11 14:05:30.253366077 +0200

@@ -493,6 +493,12 @@

       .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),

       .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },

+        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI),

+        .driver_data = APPLE_HAS_FN },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),

+      .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS),

+      .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },

    { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),

       .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },

    { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),

```

```

diff -ruN linux-3.1-rc5.orig/drivers/bcma/driver_chipcommon_pmu.c linux-3.1-rc5/drivers/bcma/driver_chipcommon_pmu.c

--- linux-3.1-rc5.orig/drivers/bcma/driver_chipcommon_pmu.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/bcma/driver_chipcommon_pmu.c   2011-09-11 16:44:25.595409713 -0700

@@ -83,6 +83,24 @@

    }

 }

 

+/* Disable to allow reading SPROM. Don't know the adventages of enabling it. */

+void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable)

+{

+   struct bcma_bus *bus = cc->core->bus;

+   u32 val;

+

+   val = bcma_cc_read32(cc, BCMA_CC_CHIPCTL);

+   if (enable) {

+      val |= BCMA_CHIPCTL_4331_EXTPA_EN;

+      if (bus->chipinfo.pkg == 9 || bus->chipinfo.pkg == 11)

+         val |= BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5;

+   } else {

+      val &= ~BCMA_CHIPCTL_4331_EXTPA_EN;

+      val &= ~BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5;

+   }

+   bcma_cc_write32(cc, BCMA_CC_CHIPCTL, val);

+}

+

 void bcma_pmu_workarounds(struct bcma_drv_cc *cc)

 {

    struct bcma_bus *bus = cc->core->bus;

@@ -92,7 +110,7 @@

       bcma_chipco_chipctl_maskset(cc, 0, ~0, 0x7);

       break;

    case 0x4331:

-      pr_err("Enabling Ext PA lines not implemented\n");

+      /* BCM4331 workaround is SPROM-related, we put it in sprom.c */

       break;

    case 43224:

       if (bus->chipinfo.rev == 0) {

diff -ruN linux-3.1-rc5.orig/drivers/bcma/sprom.c linux-3.1-rc5/drivers/bcma/sprom.c

--- linux-3.1-rc5.orig/drivers/bcma/sprom.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/bcma/sprom.c   2011-09-11 16:44:25.595409713 -0700

@@ -152,6 +152,9 @@

    if (!sprom)

       return -ENOMEM;

 

+   if (bus->chipinfo.id == 0x4331)

+      bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);

+

    /* Most cards have SPROM moved by additional offset 0x30 (48 dwords).

     * According to brcm80211 this applies to cards with PCIe rev >= 6

     * TODO: understand this condition and use it */

@@ -159,6 +162,9 @@

       BCMA_CC_SPROM_PCIE6;

    bcma_sprom_read(bus, offset, sprom);

 

+   if (bus->chipinfo.id == 0x4331)

+      bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);

+

    err = bcma_sprom_valid(sprom);

    if (err)

       goto out;

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/Kconfig linux-3.1-rc5/drivers/net/wireless/b43/Kconfig

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/Kconfig   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/Kconfig   2011-09-11 16:45:07.004360152 -0700

@@ -124,12 +124,12 @@

      (802.11a support is optional, and currently disabled).

 

 config B43_PHY_HT

-   bool "Support for HT-PHY devices (BROKEN)"

-   depends on B43 && BROKEN

+   bool "Support for HT-PHY (high throughput) devices (EXPERIMENTAL)"

+   depends on B43 && EXPERIMENTAL

    ---help---

      Support for the HT-PHY.

 

-     Say N, this is BROKEN and crashes driver.

+     Enables support for BCM4331 and possibly other chipsets with that PHY.

 

 config B43_PHY_LCN

    bool "Support for LCN-PHY devices (BROKEN)"

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/b43.h linux-3.1-rc5/drivers/net/wireless/b43/b43.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/b43.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/b43.h   2011-09-11 16:44:18.745583091 -0700

@@ -694,6 +694,12 @@

    enum b43_firmware_file_type type;

 };

 

+enum b43_firmware_hdr_format {

+   B43_FW_HDR_598,

+   B43_FW_HDR_410,

+   B43_FW_HDR_351,

+};

+

 /* Pointers to the firmware data and meta information about it. */

 struct b43_firmware {

    /* Microcode */

@@ -710,6 +716,9 @@

    /* Firmware patchlevel */

    u16 patch;

 

+   /* Format of header used by firmware */

+   enum b43_firmware_hdr_format hdr_format;

+

    /* Set to true, if we are using an opensource firmware.

     * Use this to check for proprietary vs opensource. */

    bool opensource;

@@ -875,7 +884,7 @@

    struct b43_leds leds;

 

    /* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */

-   u8 pio_scratchspace[110] __attribute__((__aligned__(8)));

+   u8 pio_scratchspace[118] __attribute__((__aligned__(8)));

    u8 pio_tailspace[4] __attribute__((__aligned__(8)));

 };

 

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/dma.c linux-3.1-rc5/drivers/net/wireless/b43/dma.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/dma.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/dma.c   2011-09-11 16:45:02.524473816 -0700

@@ -389,33 +389,34 @@

    gfp_t flags = GFP_KERNEL;

 

    /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K

-    * alignment and 8K buffers for 64-bit DMA with 8K alignment. Testing

-    * has shown that 4K is sufficient for the latter as long as the buffer

-    * does not cross an 8K boundary.

-    *

-    * For unknown reasons - possibly a hardware error - the BCM4311 rev

-    * 02, which uses 64-bit DMA, needs the ring buffer in very low memory,

-    * which accounts for the GFP_DMA flag below.

-    *

-    * The flags here must match the flags in free_ringmemory below!

+    * alignment and 8K buffers for 64-bit DMA with 8K alignment.

+    * In practice we could use smaller buffers for the latter, but the

+    * alignment is really important because of the hardware bug. If bit

+    * 0x00001000 is used in DMA address, some hardware (like BCM4331)

+    * copies that bit into B43_DMA64_RXSTATUS and we get false values from

+    * B43_DMA64_RXSTATDPTR. Let's just use 8K buffers even if we don't use

+    * more than 256 slots for ring.

     */

-   if (ring->type == B43_DMA_64BIT)

-      flags |= GFP_DMA;

+   u16 ring_mem_size = (ring->type == B43_DMA_64BIT) ?

+            B43_DMA64_RINGMEMSIZE : B43_DMA32_RINGMEMSIZE;

+

    ring->descbase = dma_alloc_coherent(ring->dev->dev->dma_dev,

-                   B43_DMA_RINGMEMSIZE,

-                   &(ring->dmabase), flags);

+                   ring_mem_size, &(ring->dmabase),

+                   flags);

    if (!ring->descbase) {

       b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");

       return -ENOMEM;

    }

-   memset(ring->descbase, 0, B43_DMA_RINGMEMSIZE);

+   memset(ring->descbase, 0, ring_mem_size);

 

    return 0;

 }

 

 static void free_ringmemory(struct b43_dmaring *ring)

 {

-   dma_free_coherent(ring->dev->dev->dma_dev, B43_DMA_RINGMEMSIZE,

+   u16 ring_mem_size = (ring->type == B43_DMA_64BIT) ?

+            B43_DMA64_RINGMEMSIZE : B43_DMA32_RINGMEMSIZE;

+   dma_free_coherent(ring->dev->dev->dma_dev, ring_mem_size,

            ring->descbase, ring->dmabase);

 }

 

@@ -872,8 +873,17 @@

       ring->current_slot = -1;

    } else {

       if (ring->index == 0) {

-         ring->rx_buffersize = B43_DMA0_RX_BUFFERSIZE;

-         ring->frameoffset = B43_DMA0_RX_FRAMEOFFSET;

+         switch (dev->fw.hdr_format) {

+         case B43_FW_HDR_598:

+            ring->rx_buffersize = B43_DMA0_RX_FW598_BUFSIZE;

+            ring->frameoffset = B43_DMA0_RX_FW598_FO;

+            break;

+         case B43_FW_HDR_410:

+         case B43_FW_HDR_351:

+            ring->rx_buffersize = B43_DMA0_RX_FW351_BUFSIZE;

+            ring->frameoffset = B43_DMA0_RX_FW351_FO;

+            break;

+         }

       } else

          B43_WARN_ON(1);

    }

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/dma.h linux-3.1-rc5/drivers/net/wireless/b43/dma.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/dma.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/dma.h   2011-09-11 16:45:02.524473816 -0700

@@ -161,13 +161,17 @@

 } __packed;

 

 /* Misc DMA constants */

-#define B43_DMA_RINGMEMSIZE      PAGE_SIZE

-#define B43_DMA0_RX_FRAMEOFFSET      30

+#define B43_DMA32_RINGMEMSIZE      4096

+#define B43_DMA64_RINGMEMSIZE      8192

+/* Offset of frame with actual data */

+#define B43_DMA0_RX_FW598_FO      38

+#define B43_DMA0_RX_FW351_FO      30

 

 /* DMA engine tuning knobs */

 #define B43_TXRING_SLOTS      256

 #define B43_RXRING_SLOTS      64

-#define B43_DMA0_RX_BUFFERSIZE      (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN)

+#define B43_DMA0_RX_FW598_BUFSIZE   (B43_DMA0_RX_FW598_FO + IEEE80211_MAX_FRAME_LEN)

+#define B43_DMA0_RX_FW351_BUFSIZE   (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)

 

 /* Pointer poison */

 #define B43_DMA_PTR_POISON      ((void *)ERR_PTR(-ENOMEM))

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/main.c linux-3.1-rc5/drivers/net/wireless/b43/main.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/main.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/main.c   2011-09-11 16:44:35.375162052 -0700

@@ -2510,6 +2510,12 @@

    }

    dev->fw.rev = fwrev;

    dev->fw.patch = fwpatch;

+   if (dev->fw.rev >= 598)

+      dev->fw.hdr_format = B43_FW_HDR_598;

+   else if (dev->fw.rev >= 410)

+      dev->fw.hdr_format = B43_FW_HDR_410;

+   else

+      dev->fw.hdr_format = B43_FW_HDR_351;

    dev->fw.opensource = (fwdate == 0xFFFF);

 

    /* Default to use-all-queues. */

@@ -2557,7 +2563,7 @@

          dev->fw.rev, dev->fw.patch);

    wiphy->hw_version = dev->dev->core_id;

 

-   if (b43_is_old_txhdr_format(dev)) {

+   if (dev->fw.hdr_format == B43_FW_HDR_351) {

       /* We're over the deadline, but we keep support for old fw

        * until it turns out to be in major conflict with something new. */

       b43warn(dev->wl, "You are using an old firmware image. "

@@ -2943,6 +2949,7 @@

    case B43_PHYTYPE_G:

    case B43_PHYTYPE_N:

    case B43_PHYTYPE_LP:

+   case B43_PHYTYPE_HT:

       b43_rate_memory_write(dev, B43_OFDM_RATE_6MB, 1);

       b43_rate_memory_write(dev, B43_OFDM_RATE_12MB, 1);

       b43_rate_memory_write(dev, B43_OFDM_RATE_18MB, 1);

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_common.c linux-3.1-rc5/drivers/net/wireless/b43/phy_common.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_common.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/phy_common.c   2011-09-11 16:44:37.435109868 -0700

@@ -448,6 +448,38 @@

       channel_type == NL80211_CHAN_HT40PLUS);

 }

 

+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */

+void b43_phy_force_clock(struct b43_wldev *dev, bool force)

+{

+   u32 tmp;

+

+   WARN_ON(dev->phy.type != B43_PHYTYPE_N &&

+      dev->phy.type != B43_PHYTYPE_HT);

+

+   switch (dev->dev->bus_type) {

+#ifdef CONFIG_B43_BCMA

+   case B43_BUS_BCMA:

+      tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);

+      if (force)

+         tmp |= BCMA_IOCTL_FGC;

+      else

+         tmp &= ~BCMA_IOCTL_FGC;

+      bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);

+      break;

+#endif

+#ifdef CONFIG_B43_SSB

+   case B43_BUS_SSB:

+      tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);

+      if (force)

+         tmp |= SSB_TMSLOW_FGC;

+      else

+         tmp &= ~SSB_TMSLOW_FGC;

+      ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);

+      break;

+#endif

+   }

+}

+

 /* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */

 struct b43_c32 b43_cordic(int theta)

 {

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_common.h linux-3.1-rc5/drivers/net/wireless/b43/phy_common.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_common.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/phy_common.h   2011-09-11 16:44:37.435109868 -0700

@@ -444,6 +444,8 @@

 

 bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type);

 

+void b43_phy_force_clock(struct b43_wldev *dev, bool force);

+

 struct b43_c32 b43_cordic(int theta);

 

 #endif /* LINUX_B43_PHY_COMMON_H_ */

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_ht.c linux-3.1-rc5/drivers/net/wireless/b43/phy_ht.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_ht.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/phy_ht.c   2011-09-11 16:59:36.266832596 -0700

@@ -152,6 +152,92 @@

 }

 

 /**************************************************

+ * Various PHY ops

+ **************************************************/

+

+static void b43_phy_ht_zero_extg(struct b43_wldev *dev)

+{

+   u8 i, j;

+   u16 base[] = { 0x40, 0x60, 0x80 };

+

+   for (i = 0; i < ARRAY_SIZE(base); i++) {

+      for (j = 0; j < 4; j++)

+         b43_phy_write(dev, B43_PHY_EXTG(base[i] + j), 0);

+   }

+

+   for (i = 0; i < ARRAY_SIZE(base); i++)

+      b43_phy_write(dev, B43_PHY_EXTG(base[i] + 0xc), 0);

+}

+

+/* Some unknown AFE (Analog Frondned) op */

+static void b43_phy_ht_afe_unk1(struct b43_wldev *dev)

+{

+   u8 i;

+

+   const u16 ctl_regs[3][2] = {

+      { B43_PHY_HT_AFE_CTL1, B43_PHY_HT_AFE_CTL2 },

+      { B43_PHY_HT_AFE_CTL3, B43_PHY_HT_AFE_CTL4 },

+      { B43_PHY_HT_AFE_CTL5, B43_PHY_HT_AFE_CTL6},

+   };

+

+   for (i = 0; i < 3; i++) {

+      /* TODO: verify masks&sets */

+      b43_phy_set(dev, ctl_regs[i][1], 0x4);

+      b43_phy_set(dev, ctl_regs[i][0], 0x4);

+      b43_phy_mask(dev, ctl_regs[i][1], ~0x1);

+      b43_phy_set(dev, ctl_regs[i][0], 0x1);

+      b43_httab_write(dev, B43_HTTAB16(8, 5 + (i * 0x10)), 0);

+      b43_phy_mask(dev, ctl_regs[i][0], ~0x4);

+   }

+}

+

+static void b43_phy_ht_force_rf_sequence(struct b43_wldev *dev, u16 rf_seq)

+{

+   u8 i;

+

+   u16 save_seq_mode = b43_phy_read(dev, B43_PHY_HT_RF_SEQ_MODE);

+   b43_phy_set(dev, B43_PHY_HT_RF_SEQ_MODE, 0x3);

+

+   b43_phy_set(dev, B43_PHY_HT_RF_SEQ_TRIG, rf_seq);

+   for (i = 0; i < 200; i++) {

+      if (!(b43_phy_read(dev, B43_PHY_HT_RF_SEQ_STATUS) & rf_seq)) {

+         i = 0;

+         break;

+      }

+      msleep(1);

+   }

+   if (i)

+      b43err(dev->wl, "Forcing RF sequence timeout\n");

+

+   b43_phy_write(dev, B43_PHY_HT_RF_SEQ_MODE, save_seq_mode);

+}

+

+static void b43_phy_ht_read_clip_detection(struct b43_wldev *dev, u16 *clip_st)

+{

+   clip_st[0] = b43_phy_read(dev, B43_PHY_HT_C1_CLIP1THRES);

+   clip_st[1] = b43_phy_read(dev, B43_PHY_HT_C2_CLIP1THRES);

+   clip_st[2] = b43_phy_read(dev, B43_PHY_HT_C3_CLIP1THRES);

+}

+

+static void b43_phy_ht_bphy_init(struct b43_wldev *dev)

+{

+   unsigned int i;

+   u16 val;

+

+   val = 0x1E1F;

+   for (i = 0; i < 16; i++) {

+      b43_phy_write(dev, B43_PHY_N_BMODE(0x88 + i), val);

+      val -= 0x202;

+   }

+   val = 0x3E3F;

+   for (i = 0; i < 16; i++) {

+      b43_phy_write(dev, B43_PHY_N_BMODE(0x98 + i), val);

+      val -= 0x202;

+   }

+   b43_phy_write(dev, B43_PHY_N_BMODE(0x38), 0x668);

+}

+

+/**************************************************

  * Channel switching ops.

  **************************************************/

 

@@ -255,8 +341,125 @@

 

 static int b43_phy_ht_op_init(struct b43_wldev *dev)

 {

+   u16 tmp;

+   u16 clip_state[3];

+

    b43_phy_ht_tables_init(dev);

 

+   b43_phy_mask(dev, 0x0be, ~0x2);

+   b43_phy_set(dev, 0x23f, 0x7ff);

+   b43_phy_set(dev, 0x240, 0x7ff);

+   b43_phy_set(dev, 0x241, 0x7ff);

+

+   b43_phy_ht_zero_extg(dev);

+

+   b43_phy_mask(dev, B43_PHY_EXTG(0), ~0x3);

+

[/profile]+   b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0);

+   b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0);

+   b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0);

+

+   b43_phy_write(dev, B43_PHY_EXTG(0x103), 0x20);

+   b43_phy_write(dev, B43_PHY_EXTG(0x101), 0x20);

+   b43_phy_write(dev, 0x20d, 0xb8);

+   b43_phy_write(dev, B43_PHY_EXTG(0x14f), 0xc8);

+   b43_phy_write(dev, 0x70, 0x50);

+   b43_phy_write(dev, 0x1ff, 0x30);

+

+   if (0) /* TODO: condition */

+      ; /* TODO: PHY op on reg 0x217 */

+

+   b43_phy_read(dev, 0xb0); /* TODO: what for? */

+   b43_phy_set(dev, 0xb0, 0x1);

+

+   b43_phy_set(dev, 0xb1, 0x91);

+   b43_phy_write(dev, 0x32f, 0x0003);

+   b43_phy_write(dev, 0x077, 0x0010);

+   b43_phy_write(dev, 0x0b4, 0x0258);

+   b43_phy_mask(dev, 0x17e, ~0x4000);

+

+   b43_phy_write(dev, 0x0b9, 0x0072);

+

+   b43_httab_write_few(dev, B43_HTTAB16(7, 0x14e), 2, 0x010f, 0x010f);

+   b43_httab_write_few(dev, B43_HTTAB16(7, 0x15e), 2, 0x010f, 0x010f);

+   b43_httab_write_few(dev, B43_HTTAB16(7, 0x16e), 2, 0x010f, 0x010f);

+

+   b43_phy_ht_afe_unk1(dev);

+

+   b43_httab_write_few(dev, B43_HTTAB16(7, 0x130), 9, 0x777, 0x111, 0x111,

+             0x777, 0x111, 0x111, 0x777, 0x111, 0x111);

+

+   b43_httab_write(dev, B43_HTTAB16(7, 0x120), 0x0777);

+   b43_httab_write(dev, B43_HTTAB16(7, 0x124), 0x0777);

+

+   b43_httab_write(dev, B43_HTTAB16(8, 0x00), 0x02);

+   b43_httab_write(dev, B43_HTTAB16(8, 0x10), 0x02);

+   b43_httab_write(dev, B43_HTTAB16(8, 0x20), 0x02);

+

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x08), 4,

+             0x8e, 0x96, 0x96, 0x96);

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x18), 4,

+             0x8f, 0x9f, 0x9f, 0x9f);

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x28), 4,

+             0x8f, 0x9f, 0x9f, 0x9f);

+

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x0c), 4, 0x2, 0x2, 0x2, 0x2);

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x1c), 4, 0x2, 0x2, 0x2, 0x2);

+   b43_httab_write_few(dev, B43_HTTAB16(8, 0x2c), 4, 0x2, 0x2, 0x2, 0x2);

+

+   b43_phy_maskset(dev, 0x0280, 0xff00, 0x3e);

+   b43_phy_maskset(dev, 0x0283, 0xff00, 0x3e);

+   b43_phy_maskset(dev, B43_PHY_OFDM(0x0141), 0xff00, 0x46);

+   b43_phy_maskset(dev, 0x0283, 0xff00, 0x40);

+

+   b43_httab_write_few(dev, B43_HTTAB16(00, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+   b43_httab_write_few(dev, B43_HTTAB16(01, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+   /* TODO: Did wl mean 2 instead of 40? */

+   b43_httab_write_few(dev, B43_HTTAB16(40, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+

+   b43_phy_maskset(dev, B43_PHY_OFDM(0x24), 0x3f, 0xd);

+   b43_phy_maskset(dev, B43_PHY_OFDM(0x64), 0x3f, 0xd);

+   b43_phy_maskset(dev, B43_PHY_OFDM(0xa4), 0x3f, 0xd);

+

+   b43_phy_set(dev, B43_PHY_EXTG(0x060), 0x1);

+   b43_phy_set(dev, B43_PHY_EXTG(0x064), 0x1);

+   b43_phy_set(dev, B43_PHY_EXTG(0x080), 0x1);

+   b43_phy_set(dev, B43_PHY_EXTG(0x084), 0x1);

+

+   /* Copy some tables entries */

+   tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x144));

+   b43_httab_write(dev, B43_HTTAB16(7, 0x14a), tmp);

+   tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x154));

+   b43_httab_write(dev, B43_HTTAB16(7, 0x15a), tmp);

+   tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x164));

+   b43_httab_write(dev, B43_HTTAB16(7, 0x16a), tmp);

+

+   /* Reset CCA */

+   b43_phy_force_clock(dev, true);

+   tmp = b43_phy_read(dev, B43_PHY_HT_BBCFG);

+   b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp | B43_PHY_HT_BBCFG_RSTCCA);

+   b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp & ~B43_PHY_HT_BBCFG_RSTCCA);

+   b43_phy_force_clock(dev, false);

+

+   b43_mac_phy_clock_set(dev, true);

+

+   b43_phy_ht_force_rf_sequence(dev, B43_PHY_HT_RF_SEQ_TRIG_RX2TX);

+   b43_phy_ht_force_rf_sequence(dev, B43_PHY_HT_RF_SEQ_TRIG_RST2RX);

+

+   /* TODO: PHY op on reg 0xb0 */

+

+   /* TODO: Should we restore it? Or store it in global PHY info? */

+   b43_phy_ht_read_clip_detection(dev, clip_state);

+

+   if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)

+      b43_phy_ht_bphy_init(dev);

+

+   b43_httab_write_bulk(dev, B43_HTTAB32(0x1a, 0xc0),

+         B43_HTTAB_1A_C0_LATE_SIZE, b43_httab_0x1a_0xc0_late);

+

    return 0;

 }

 

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_ht.h linux-3.1-rc5/drivers/net/wireless/b43/phy_ht.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_ht.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/phy_ht.h   2011-09-11 16:59:36.266832596 -0700

@@ -4,7 +4,11 @@

 #include "phy_common.h"

 

 

+#define B43_PHY_HT_BBCFG         0x001 /* BB config */

+#define  B43_PHY_HT_BBCFG_RSTCCA      0x4000 /* Reset CCA */

+#define  B43_PHY_HT_BBCFG_RSTRX         0x8000 /* Reset RX */

 #define B43_PHY_HT_BANDCTL         0x009 /* Band control */

+#define  B43_PHY_HT_BANDCTL_5GHZ      0x0001 /* Use the 5GHz band */

 #define B43_PHY_HT_TABLE_ADDR         0x072 /* Table address */

 #define B43_PHY_HT_TABLE_DATALO         0x073 /* Table data low */

 #define B43_PHY_HT_TABLE_DATAHI         0x074 /* Table data high */

@@ -15,6 +19,21 @@

 #define B43_PHY_HT_BW5            0x1D2

 #define B43_PHY_HT_BW6            0x1D3

 

+#define B43_PHY_HT_C1_CLIP1THRES      B43_PHY_OFDM(0x00E)

+#define B43_PHY_HT_C2_CLIP1THRES      B43_PHY_OFDM(0x04E)

+#define B43_PHY_HT_C3_CLIP1THRES      B43_PHY_OFDM(0x08E)

+

+#define B43_PHY_HT_RF_SEQ_MODE         B43_PHY_EXTG(0x000)

+#define B43_PHY_HT_RF_SEQ_TRIG         B43_PHY_EXTG(0x003)

+#define  B43_PHY_HT_RF_SEQ_TRIG_RX2TX      0x0001 /* RX2TX */

+#define  B43_PHY_HT_RF_SEQ_TRIG_TX2RX      0x0002 /* TX2RX */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGH      0x0004 /* Update gain H */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGL      0x0008 /* Update gain L */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGU      0x0010 /* Update gain U */

+#define  B43_PHY_HT_RF_SEQ_TRIG_RST2RX      0x0020 /* Reset to RX */

+#define B43_PHY_HT_RF_SEQ_STATUS      B43_PHY_EXTG(0x004)

+/* Values for the status are the same as for the trigger */

+

 #define B43_PHY_HT_RF_CTL1         B43_PHY_EXTG(0x010)

 

 #define B43_PHY_HT_AFE_CTL1         B43_PHY_EXTG(0x110)

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_n.c linux-3.1-rc5/drivers/net/wireless/b43/phy_n.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/phy_n.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/phy_n.c   2011-09-11 16:44:37.435109868 -0700

@@ -600,49 +600,17 @@

    }

 }

 

-/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */

-static void b43_nphy_bmac_clock_fgc(struct b43_wldev *dev, bool force)

-{

-   u32 tmp;

-

-   if (dev->phy.type != B43_PHYTYPE_N)

-      return;

-

-   switch (dev->dev->bus_type) {

-#ifdef CONFIG_B43_BCMA

-   case B43_BUS_BCMA:

-      tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);

-      if (force)

-         tmp |= BCMA_IOCTL_FGC;

-      else

-         tmp &= ~BCMA_IOCTL_FGC;

-      bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);

-      break;

-#endif

-#ifdef CONFIG_B43_SSB

-   case B43_BUS_SSB:

-      tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);

-      if (force)

-         tmp |= SSB_TMSLOW_FGC;

-      else

-         tmp &= ~SSB_TMSLOW_FGC;

-      ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);

-      break;

-#endif

-   }

-}

-

 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */

 static void b43_nphy_reset_cca(struct b43_wldev *dev)

 {

    u16 bbcfg;

 

-   b43_nphy_bmac_clock_fgc(dev, 1);

+   b43_phy_force_clock(dev, 1);

    bbcfg = b43_phy_read(dev, B43_NPHY_BBCFG);

    b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg | B43_NPHY_BBCFG_RSTCCA);

    udelay(1);

    b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg & ~B43_NPHY_BBCFG_RSTCCA);

-   b43_nphy_bmac_clock_fgc(dev, 0);

+   b43_phy_force_clock(dev, 0);

    b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX);

 }

 

@@ -3715,11 +3683,11 @@

    b43_nphy_workarounds(dev);

 

    /* Reset CCA, in init code it differs a little from standard way */

-   b43_nphy_bmac_clock_fgc(dev, 1);

+   b43_phy_force_clock(dev, 1);

    tmp = b43_phy_read(dev, B43_NPHY_BBCFG);

    b43_phy_write(dev, B43_NPHY_BBCFG, tmp | B43_NPHY_BBCFG_RSTCCA);

    b43_phy_write(dev, B43_NPHY_BBCFG, tmp & ~B43_NPHY_BBCFG_RSTCCA);

-   b43_nphy_bmac_clock_fgc(dev, 0);

+   b43_phy_force_clock(dev, 0);

 

    b43_mac_phy_clock_set(dev, true);

 

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/pio.c linux-3.1-rc5/drivers/net/wireless/b43/pio.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/pio.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/pio.c   2011-09-11 16:44:23.725457051 -0700

@@ -676,7 +676,15 @@

       goto rx_error;

    }

 

-   macstat = le32_to_cpu(rxhdr->mac_status);

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      macstat = le32_to_cpu(rxhdr->format_598.mac_status);

+      break;

+   case B43_FW_HDR_410:

+   case B43_FW_HDR_351:

+      macstat = le32_to_cpu(rxhdr->format_351.mac_status);

+      break;

+   }

    if (macstat & B43_RX_MAC_FCSERR) {

       if (!(q->dev->wl->filter_flags & FIF_FCSFAIL)) {

          /* Drop frames with failed FCS. */

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/tables_phy_ht.c linux-3.1-rc5/drivers/net/wireless/b43/tables_phy_ht.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/tables_phy_ht.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/tables_phy_ht.c   2011-09-11 16:44:48.854820469 -0700

@@ -574,6 +574,42 @@

    0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,

 };

 

+/* Some late-init table */

+const u32 b43_httab_0x1a_0xc0_late[] = {

+   0x10f90040, 0x10e10040, 0x10e1003c, 0x10c9003d,

+   0x10b9003c, 0x10a9003d, 0x10a1003c, 0x1099003b,

+   0x1091003b, 0x1089003a, 0x1081003a, 0x10790039,

+   0x10710039, 0x1069003a, 0x1061003b, 0x1059003d,

+   0x1051003f, 0x10490042, 0x1049003e, 0x1049003b,

+   0x1041003e, 0x1041003b, 0x1039003e, 0x1039003b,

+   0x10390038, 0x10390035, 0x1031003a, 0x10310036,

+   0x10310033, 0x1029003a, 0x10290037, 0x10290034,

+   0x10290031, 0x10210039, 0x10210036, 0x10210033,

+   0x10210030, 0x1019003c, 0x10190039, 0x10190036,

+   0x10190033, 0x10190030, 0x1019002d, 0x1019002b,

+   0x10190028, 0x1011003a, 0x10110036, 0x10110033,

+   0x10110030, 0x1011002e, 0x1011002b, 0x10110029,

+   0x10110027, 0x10110024, 0x10110022, 0x10110020,

+   0x1011001f, 0x1011001d, 0x1009003a, 0x10090037,

+   0x10090034, 0x10090031, 0x1009002e, 0x1009002c,

+   0x10090029, 0x10090027, 0x10090025, 0x10090023,

+   0x10090021, 0x1009001f, 0x1009001d, 0x1009001b,

+   0x1009001a, 0x10090018, 0x10090017, 0x10090016,

+   0x10090015, 0x10090013, 0x10090012, 0x10090011,

+   0x10090010, 0x1009000f, 0x1009000f, 0x1009000e,

+   0x1009000d, 0x1009000c, 0x1009000c, 0x1009000b,

+   0x1009000a, 0x1009000a, 0x10090009, 0x10090009,

+   0x10090008, 0x10090008, 0x10090007, 0x10090007,

+   0x10090007, 0x10090006, 0x10090006, 0x10090005,

+   0x10090005, 0x10090005, 0x10090005, 0x10090004,

+   0x10090004, 0x10090004, 0x10090004, 0x10090003,

+   0x10090003, 0x10090003, 0x10090003, 0x10090003,

+   0x10090003, 0x10090002, 0x10090002, 0x10090002,

+   0x10090002, 0x10090002, 0x10090002, 0x10090002,

+   0x10090002, 0x10090002, 0x10090001, 0x10090001,

+   0x10090001, 0x10090001, 0x10090001, 0x10090001,

+};

+

 /**************************************************

  * R/W ops.

  **************************************************/

@@ -674,6 +710,51 @@

    return;

 }

 

+void b43_httab_write_few(struct b43_wldev *dev, u32 offset, size_t num, ...)

+{

+   va_list args;

+   u32 type, value;

+   unsigned int i;

+

+   type = offset & B43_HTTAB_TYPEMASK;

+   offset &= 0xFFFF;

+

+   va_start(args, num);

+   switch (type) {

+   case B43_HTTAB_8BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         B43_WARN_ON(value & ~0xFF);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);

+      }

+      break;

+   case B43_HTTAB_16BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         B43_WARN_ON(value & ~0xFFFF);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);

+      }

+      break;

+   case B43_HTTAB_32BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI,

+                  value >> 16);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO,

+                  value & 0xFFFF);

+      }

+      break;

+   default:

+      B43_WARN_ON(1);

+   }

+   va_end(args);

+

+   return;

+}

+

 void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,

            unsigned int nr_elements, const void *_data)

 {

@@ -723,6 +804,9 @@

    } while (0)

 void b43_phy_ht_tables_init(struct b43_wldev *dev)

 {

+   BUILD_BUG_ON(ARRAY_SIZE(b43_httab_0x1a_0xc0_late) !=

+         B43_HTTAB_1A_C0_LATE_SIZE);

+

    httab_upload(dev, B43_HTTAB16(0x12, 0), b43_httab_0x12);

    httab_upload(dev, B43_HTTAB16(0x27, 0), b43_httab_0x27);

    httab_upload(dev, B43_HTTAB16(0x26, 0), b43_httab_0x26);

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/tables_phy_ht.h linux-3.1-rc5/drivers/net/wireless/b43/tables_phy_ht.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/tables_phy_ht.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/tables_phy_ht.h   2011-09-11 16:44:48.854820469 -0700

@@ -14,9 +14,13 @@

 void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,

           unsigned int nr_elements, void *_data);

 void b43_httab_write(struct b43_wldev *dev, u32 offset, u32 value);

+void b43_httab_write_few(struct b43_wldev *dev, u32 offset, size_t num, ...);

 void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,

            unsigned int nr_elements, const void *_data);

 

 void b43_phy_ht_tables_init(struct b43_wldev *dev);

 

+#define B43_HTTAB_1A_C0_LATE_SIZE      128

+extern const u32 b43_httab_0x1a_0xc0_late[];

+

 #endif /* B43_TABLES_PHY_HT_H_ */

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/xmit.c linux-3.1-rc5/drivers/net/wireless/b43/xmit.c

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/xmit.c   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/xmit.c   2011-09-11 16:44:35.375162052 -0700

@@ -337,12 +337,19 @@

          memcpy(txhdr->iv, ((u8 *) wlhdr) + wlhdr_len, iv_len);

       }

    }

-   if (b43_is_old_txhdr_format(dev)) {

-      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp),

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_598.plcp),

                   plcp_fragment_len, rate);

-   } else {

-      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->new_format.plcp),

+      break;

+   case B43_FW_HDR_351:

+      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_351.plcp),

+                  plcp_fragment_len, rate);

+      break;

+   case B43_FW_HDR_410:

+      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_410.plcp),

                   plcp_fragment_len, rate);

+      break;

    }

    b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb),

                plcp_fragment_len, rate_fb);

@@ -415,10 +422,10 @@

    if ((rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||

        (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) {

       unsigned int len;

-      struct ieee80211_hdr *hdr;

+      struct ieee80211_hdr *uninitialized_var(hdr);

       int rts_rate, rts_rate_fb;

       int rts_rate_ofdm, rts_rate_fb_ofdm;

-      struct b43_plcp_hdr6 *plcp;

+      struct b43_plcp_hdr6 *uninitialized_var(plcp);

       struct ieee80211_rate *rts_cts_rate;

 

       rts_cts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info);

@@ -429,14 +436,21 @@

       rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);

 

       if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {

-         struct ieee80211_cts *cts;

+         struct ieee80211_cts *uninitialized_var(cts);

 

-         if (b43_is_old_txhdr_format(dev)) {

+         switch (dev->fw.hdr_format) {

+         case B43_FW_HDR_598:

             cts = (struct ieee80211_cts *)

-               (txhdr->old_format.rts_frame);

-         } else {

+               (txhdr->format_598.rts_frame);

+            break;

+         case B43_FW_HDR_351:

             cts = (struct ieee80211_cts *)

-               (txhdr->new_format.rts_frame);

+               (txhdr->format_351.rts_frame);

+            break;

+         case B43_FW_HDR_410:

+            cts = (struct ieee80211_cts *)

+               (txhdr->format_410.rts_frame);

+            break;

          }

          ieee80211_ctstoself_get(dev->wl->hw, info->control.vif,

                   fragment_data, fragment_len,

@@ -444,14 +458,21 @@

          mac_ctl |= B43_TXH_MAC_SENDCTS;

          len = sizeof(struct ieee80211_cts);

       } else {

-         struct ieee80211_rts *rts;

+         struct ieee80211_rts *uninitialized_var(rts);

 

-         if (b43_is_old_txhdr_format(dev)) {

+         switch (dev->fw.hdr_format) {

+         case B43_FW_HDR_598:

             rts = (struct ieee80211_rts *)

-               (txhdr->old_format.rts_frame);

-         } else {

+               (txhdr->format_598.rts_frame);

+            break;

+         case B43_FW_HDR_351:

+            rts = (struct ieee80211_rts *)

+               (txhdr->format_351.rts_frame);

+            break;

+         case B43_FW_HDR_410:

             rts = (struct ieee80211_rts *)

-               (txhdr->new_format.rts_frame);

+               (txhdr->format_410.rts_frame);

+            break;

          }

          ieee80211_rts_get(dev->wl->hw, info->control.vif,

                  fragment_data, fragment_len,

@@ -462,22 +483,36 @@

       len += FCS_LEN;

 

       /* Generate the PLCP headers for the RTS/CTS frame */

-      if (b43_is_old_txhdr_format(dev))

-         plcp = &txhdr->old_format.rts_plcp;

-      else

-         plcp = &txhdr->new_format.rts_plcp;

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

+         plcp = &txhdr->format_598.rts_plcp;

+         break;

+      case B43_FW_HDR_351:

+         plcp = &txhdr->format_351.rts_plcp;

+         break;

+      case B43_FW_HDR_410:

+         plcp = &txhdr->format_410.rts_plcp;

+         break;

+      }

       b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,

                   len, rts_rate);

       plcp = &txhdr->rts_plcp_fb;

       b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,

                   len, rts_rate_fb);

 

-      if (b43_is_old_txhdr_format(dev)) {

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

          hdr = (struct ieee80211_hdr *)

-            (&txhdr->old_format.rts_frame);

-      } else {

+            (&txhdr->format_598.rts_frame);

+         break;

+      case B43_FW_HDR_351:

+         hdr = (struct ieee80211_hdr *)

+            (&txhdr->format_351.rts_frame);

+         break;

+      case B43_FW_HDR_410:

          hdr = (struct ieee80211_hdr *)

-            (&txhdr->new_format.rts_frame);

+            (&txhdr->format_410.rts_frame);

+         break;

       }

       txhdr->rts_dur_fb = hdr->duration_id;

 

@@ -505,10 +540,17 @@

    }

 

    /* Magic cookie */

-   if (b43_is_old_txhdr_format(dev))

-      txhdr->old_format.cookie = cpu_to_le16(cookie);

-   else

-      txhdr->new_format.cookie = cpu_to_le16(cookie);

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      txhdr->format_598.cookie = cpu_to_le16(cookie);

+      break;

+   case B43_FW_HDR_351:

+      txhdr->format_351.cookie = cpu_to_le16(cookie);

+      break;

+   case B43_FW_HDR_410:

+      txhdr->format_410.cookie = cpu_to_le16(cookie);

+      break;

+   }

 

    if (phy->type == B43_PHYTYPE_N) {

       txhdr->phy_ctl1 =

@@ -611,8 +653,9 @@

    struct ieee80211_hdr *wlhdr;

    const struct b43_rxhdr_fw4 *rxhdr = _rxhdr;

    __le16 fctl;

-   u16 phystat0, phystat3, chanstat, mactime;

-   u32 macstat;

+   u16 phystat0, phystat3;

+   u16 uninitialized_var(chanstat), uninitialized_var(mactime);

+   u32 uninitialized_var(macstat);

    u16 chanid;

    u16 phytype;

    int padding;

@@ -622,9 +665,19 @@

    /* Get metadata about the frame from the header. */

    phystat0 = le16_to_cpu(rxhdr->phy_status0);

    phystat3 = le16_to_cpu(rxhdr->phy_status3);

-   macstat = le32_to_cpu(rxhdr->mac_status);

-   mactime = le16_to_cpu(rxhdr->mac_time);

-   chanstat = le16_to_cpu(rxhdr->channel);

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      macstat = le32_to_cpu(rxhdr->format_598.mac_status);

+      mactime = le16_to_cpu(rxhdr->format_598.mac_time);

+      chanstat = le16_to_cpu(rxhdr->format_598.channel);

+      break;

+   case B43_FW_HDR_410:

+   case B43_FW_HDR_351:

+      macstat = le32_to_cpu(rxhdr->format_351.mac_status);

+      mactime = le16_to_cpu(rxhdr->format_351.mac_time);

+      chanstat = le16_to_cpu(rxhdr->format_351.channel);

+      break;

+   }

    phytype = chanstat & B43_RX_CHAN_PHYTYPE;

 

    if (unlikely(macstat & B43_RX_MAC_FCSERR)) {

@@ -744,6 +797,7 @@

       break;

    case B43_PHYTYPE_N:

    case B43_PHYTYPE_LP:

+   case B43_PHYTYPE_HT:

       /* chanid is the SHM channel cookie. Which is the plain

        * channel number in b43. */

       if (chanstat & B43_RX_CHAN_5GHZ) {

diff -ruN linux-3.1-rc5.orig/drivers/net/wireless/b43/xmit.h linux-3.1-rc5/drivers/net/wireless/b43/xmit.h

--- linux-3.1-rc5.orig/drivers/net/wireless/b43/xmit.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/drivers/net/wireless/b43/xmit.h   2011-09-11 16:44:23.725457051 -0700

@@ -46,7 +46,24 @@

    __le32 timeout;         /* Timeout */

 

    union {

-      /* The new r410 format. */

+      /* Tested with 598.314, 644.1001 and 666.2 */

+      struct {

+         __le16 mimo_antenna;            /* MIMO antenna select */

+         __le16 preload_size;            /* Preload size */

+         PAD_BYTES(2);

+         __le16 cookie;                  /* TX frame cookie */

+         __le16 tx_status;               /* TX status */

+         __le16 max_n_mpdus;

+         __le16 max_a_bytes_mrt;

+         __le16 max_a_bytes_fbr;

+         __le16 min_m_bytes;

+         struct b43_plcp_hdr6 rts_plcp;  /* RTS PLCP header */

+         __u8 rts_frame[16];             /* The RTS frame (if used) */

+         PAD_BYTES(2);

+         struct b43_plcp_hdr6 plcp;      /* Main PLCP header */

+      } format_598 __packed;

+

+      /* Tested with 410.2160, 478.104 and 508.* */

       struct {

          __le16 mimo_antenna;      /* MIMO antenna select */

          __le16 preload_size;      /* Preload size */

@@ -57,9 +74,9 @@

          __u8 rts_frame[16];      /* The RTS frame (if used) */

          PAD_BYTES(2);

          struct b43_plcp_hdr6 plcp;   /* Main PLCP header */

-      } new_format __packed;

+      } format_410 __packed;

 

-      /* The old r351 format. */

+      /* Tested with 351.126 */

       struct {

          PAD_BYTES(2);

          __le16 cookie;         /* TX frame cookie */

@@ -68,7 +85,7 @@

          __u8 rts_frame[16];      /* The RTS frame (if used) */

          PAD_BYTES(2);

          struct b43_plcp_hdr6 plcp;   /* Main PLCP header */

-      } old_format __packed;

+      } format_351 __packed;

 

    } __packed;

 } __packed;

@@ -166,19 +183,18 @@

 #define  B43_TXH_PHY1_MODUL_QAM256   0x2000 /* QAM256 */

 

 

-/* r351 firmware compatibility stuff. */

-static inline

-bool b43_is_old_txhdr_format(struct b43_wldev *dev)

-{

-   return (dev->fw.rev <= 351);

-}

-

 static inline

 size_t b43_txhdr_size(struct b43_wldev *dev)

 {

-   if (b43_is_old_txhdr_format(dev))

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      return 112 + sizeof(struct b43_plcp_hdr6);

+   case B43_FW_HDR_410:

+      return 104 + sizeof(struct b43_plcp_hdr6);

+   case B43_FW_HDR_351:

       return 100 + sizeof(struct b43_plcp_hdr6);

-   return 104 + sizeof(struct b43_plcp_hdr6);

+   }

+   return 0;

 }

 

 

@@ -234,9 +250,23 @@

    } __packed;

    __le16 phy_status2;   /* PHY RX Status 2 */

    __le16 phy_status3;   /* PHY RX Status 3 */

-   __le32 mac_status;   /* MAC RX status */

-   __le16 mac_time;

-   __le16 channel;

+   union {

+      /* Tested with 598.314, 644.1001 and 666.2 */

+      struct {

+         __le16 phy_status4;   /* PHY RX Status 4 */

+         __le16 phy_status5;   /* PHY RX Status 5 */

+         __le32 mac_status;   /* MAC RX status */

+         __le16 mac_time;

+         __le16 channel;

+      } format_598 __packed;

+

+      /* Tested with 351.126, 410.2160, 478.104 and 508.* */

+      struct {

+         __le32 mac_status;   /* MAC RX status */

+         __le16 mac_time;

+         __le16 channel;

+      } format_351 __packed;

+   } __packed;

 } __packed;

 

 /* PHY RX Status 0 */

diff -ruN linux-3.1-rc5.orig/include/linux/bcma/bcma_driver_chipcommon.h linux-3.1-rc5/include/linux/bcma/bcma_driver_chipcommon.h

--- linux-3.1-rc5.orig/include/linux/bcma/bcma_driver_chipcommon.h   2011-09-04 15:45:10.000000000 -0700

+++ linux-3.1-rc5/include/linux/bcma/bcma_driver_chipcommon.h   2011-09-11 16:44:25.595409713 -0700

@@ -239,6 +239,22 @@

 #define BCMA_CC_SPROM         0x0800 /* SPROM beginning */

 #define BCMA_CC_SPROM_PCIE6      0x0830 /* SPROM beginning on PCIe rev >= 6 */

 

+/* BCM4331 ChipControl numbers. */

+#define BCMA_CHIPCTL_4331_BT_COEXIST      BIT(0)   /* 0 disable */

+#define BCMA_CHIPCTL_4331_SECI         BIT(1)   /* 0 SECI is disabled (JATG functional) */

+#define BCMA_CHIPCTL_4331_EXT_LNA      BIT(2)   /* 0 disable */

+#define BCMA_CHIPCTL_4331_SPROM_GPIO13_15   BIT(3)   /* sprom/gpio13-15 mux */

+#define BCMA_CHIPCTL_4331_EXTPA_EN      BIT(4)   /* 0 ext pa disable, 1 ext pa enabled */

+#define BCMA_CHIPCTL_4331_GPIOCLK_ON_SPROMCS   BIT(5)   /* set drive out GPIO_CLK on sprom_cs pin */

+#define BCMA_CHIPCTL_4331_PCIE_MDIO_ON_SPROMCS   BIT(6)   /* use sprom_cs pin as PCIE mdio interface */

+#define BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5   BIT(7)   /* aband extpa will be at gpio2/5 and sprom_dout */

+#define BCMA_CHIPCTL_4331_OVR_PIPEAUXCLKEN   BIT(8)   /* override core control on pipe_AuxClkEnable */

+#define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN   BIT(9)   /* override core control on pipe_AuxPowerDown */

+#define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN      BIT(10)   /* pcie_auxclkenable */

+#define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN   BIT(11)   /* pcie_pipe_pllpowerdown */

+#define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4   BIT(16)   /* enable bt_shd0 at gpio4 */

+#define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5   BIT(17)   /* enable bt_shd1 at gpio5 */

+

 /* Data for the PMU, if available.

  * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)

  */

@@ -275,6 +291,8 @@

 extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);

 extern void bcma_chipco_resume(struct bcma_drv_cc *cc);

 

+void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);

+

 extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc,

                  u32 ticks);

 

```

--- linux-3.1-rc5/drivers/hid/hid-ids.h	2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/hid/hid-ids.h	2011-09-11 14:00:16.576690616 +0200

@@ -109,6 +109,9 @@

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI	0x0245

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO	0x0246

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS	0x0247

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI   0x0252

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO    0x0253

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS    0x0254

 #define USB_DEVICE_ID_APPLE_ALU_REVB_ANSI	0x024f

 #define USB_DEVICE_ID_APPLE_ALU_REVB_ISO	0x0250

 #define USB_DEVICE_ID_APPLE_ALU_REVB_JIS	0x0251

[/bug]

```

--- linux-3.1-rc5/drivers/video/backlight/apple_bl.c   2011-09-05 00:45:10.000000000 +0200

+++ linux-3.1-rc5patched/drivers/video/backlight/apple_bl.c   2011-09-10 23:41:29.140375200 +0200

@@ -31,6 +31,8 @@

    /* I/O resource to allocate. */

    unsigned long iostart;

    unsigned long iolen;

+   unsigned long io_1_start;

+   unsigned long io_1_len;

    /* Backlight operations structure. */

    const struct backlight_ops backlight_ops;

    void (*set_brightness)(int);

@@ -44,6 +46,12 @@

 static int debug;

 module_param_named(debug, debug, int, 0644);

 MODULE_PARM_DESC(debug, "Set to one to enable debugging messages.");

+static int use_gmux;

+module_param_named(use_gmux, use_gmux, int, 0644);

+MODULE_PARM_DESC(use_gmux, "Set to one to use gmux backlight method");

+static int max_brightness = 132000;

+module_param_named(max_brightness, max_brightness, int, 0644);

+MODULE_PARM_DESC(max_brightness, "Set to max allowable brightness");

 

 /*

  * Implementation for machines with Intel chipset.

@@ -139,6 +147,53 @@

    .set_brightness = nvidia_chipset_set_brightness,

 };

 

+#define PORT_BACKLIGHT_1 0x774

+#define PORT_BACKLIGHT_2 0x10724

+

+static void gmux_set_brightness(int intensity)

+{

+   outw(0x2f, PORT_BACKLIGHT_2);

+   outl(intensity, PORT_BACKLIGHT_1);

+}

+

+static int gmux_send_intensity(struct backlight_device *bd)

+{

+   int intensity = bd->props.brightness;

+

+   if (debug)

+      printk(KERN_DEBUG DRIVER "setting brightness to %d\n",

+             intensity);

+

+   gmux_set_brightness(intensity);

+   return 0;

+}

+

+static int gmux_get_intensity(struct backlight_device *bd)

+{

+   int intensity;

+   intensity = inl(PORT_BACKLIGHT_1);

+

+   if (debug)

+      printk(KERN_DEBUG DRIVER "read brightness of %d\n",

+             intensity);

+

+   return intensity;

+}

+

+static const struct hw_data gmux_data = {

+   .iostart = PORT_BACKLIGHT_1,

+   .iolen = 4,

+   .io_1_start = PORT_BACKLIGHT_2,

+   .io_1_len = 2,

+   .backlight_ops      = {

+      .options   = BL_CORE_SUSPENDRESUME,

+      .get_brightness   = gmux_get_intensity,

+      .update_status   = gmux_send_intensity

+   },

+   .set_brightness = gmux_set_brightness,

+};

+

+

 static int __devinit apple_bl_add(struct acpi_device *dev)

 {

    struct backlight_properties props;

@@ -152,10 +207,16 @@

       return -ENODEV;

    }

 

-   if (host->vendor == PCI_VENDOR_ID_INTEL)

-      hw_data = &intel_chipset_data;

-   else if (host->vendor == PCI_VENDOR_ID_NVIDIA)

-      hw_data = &nvidia_chipset_data;

+   if(use_gmux == 0) {

+      if (host->vendor == PCI_VENDOR_ID_INTEL)

+         hw_data = &intel_chipset_data;

+      else if (host->vendor == PCI_VENDOR_ID_NVIDIA)

+         hw_data = &nvidia_chipset_data;

+   }

+   else 

+      hw_data = &gmux_data;

+   

+   printk(KERN_ERR DRIVER "host->vendor == %x gmux = %d", host->vendor, use_gmux);

 

    pci_dev_put(host);

 

@@ -170,24 +231,38 @@

 

    if (!intensity) {

       hw_data->set_brightness(1);

-      if (!hw_data->backlight_ops.get_brightness(NULL))

+      if (!hw_data->backlight_ops.get_brightness(NULL)) {

+         printk(KERN_ERR DRIVER "cannot set brightness - no device found\n");

          return -ENODEV;

+      }

+      

 

       hw_data->set_brightness(0);

    }

-

+   

    if (!request_region(hw_data->iostart, hw_data->iolen,

-             "Apple backlight"))

-      return -ENXIO;

+                  "Apple backlight")) {

+      printk(KERN_ERR DRIVER "cannot request backlight region\n");

+      //      return -ENXIO;

+   }

+   if (hw_data->io_1_start != 0 && !request_region(hw_data->io_1_start, hw_data->io_1_len,

+                  "Apple backlight1")) {

+      printk(KERN_ERR DRIVER "cannot request backlight region 1\n");

+      //      return -ENXIO;

+   }

+   

 

    memset(&props, 0, sizeof(struct backlight_properties));

    props.type = BACKLIGHT_PLATFORM;

-   props.max_brightness = 15;

-   apple_backlight_device = backlight_device_register("apple_backlight",

+   props.max_brightness = use_gmux ? max_brightness : 15;

+   apple_backlight_device = backlight_device_register("acpi_video0",

               NULL, NULL, &hw_data->backlight_ops, &props);

 

    if (IS_ERR(apple_backlight_device)) {

       release_region(hw_data->iostart, hw_data->iolen);

+      if(hw_data->io_1_start)

+         release_region(hw_data->io_1_start, hw_data->io_1_len);

+      printk(KERN_ERR DRIVER "cannot register device\n");

       return PTR_ERR(apple_backlight_device);

    }

 

@@ -203,6 +278,8 @@

    backlight_device_unregister(apple_backlight_device);

 

    release_region(hw_data->iostart, hw_data->iolen);

+   if(hw_data->io_1_start)

+      release_region(hw_data->io_1_start, hw_data->io_1_len);

    hw_data = NULL;

    return 0;

 }

```

----------

## alvinwu

That's great!

I apply your patches, except those for the 4331 wireless card, and brightness control works! (with apple_bl option use_gmux=1) 

NOTE: git-sources-3.1_rc6 and rc5 both works....but with a slightly different minor problems..

I shall take a little more time to test for other functionalities....

----------

## alvinwu

I'm finally apply the patches for 4331 wireless chip. That works! 

Also, by the mean time, the sd card works..

Testing on external monitor (HDMI full hd TV set), while hotplugin, I have to switch to console, then back to the vt7, it works but with some garbage background.

The SD card now function normally without pug in the LAN cable!

I like to summaries the steps on how i make this mbp82 be my favourite working machine!

----------------------START-------------------------------

----kernel------------

git-sources-3.1_rc6

-----grub2  efi------------------------

user grub2 to be the efi bootloader

bzr then

./autogen.sh

./configure --with-platform=efi --target=x86_64 --program-prefix=""

after make and make install

then what I do is:

./grub-mkimage -d ./grub-core -O x86_64-efi -p "" -o grub.efi part_gpt hfsplus

fat ext2 normal chain boot configfile linux ls search search_fs_file

search_fs_uuid search_label help echo font password_pbkdf2 fixvideo

Then do grub-mkconfig as usual

-------------------- patches -------------------

apply those patches as shown...

NOTE:  

As those patches cannot apply smoothly, I manually edit the sources and produce working patches... will show later..

-----xorg.conf.d-----------------

(A)

Section "Device"

	Identifier   "Card0"

	Driver       "radeon"

	BusID        "1:0:0"

#	Option		"DynamicPM"	"1"

	Option		"ColorTiling"	"1"

#	Option		"ClockGating"	"1"

	Option		"ForceLowPowerMode"	"1"

EndSection

(B)

Section "InputClass"

	MatchIsTouchpad "true"

	Identifier      "Touchpads"

	Driver          "mtrack"

EndSection

---------kernel config ------------------

#

# Automatically generated file; DO NOT EDIT.

# Linux/x86 3.1.0-rc6 Kernel Configuration

#

CONFIG_64BIT=y

# CONFIG_X86_32 is not set

CONFIG_X86_64=y

CONFIG_X86=y

CONFIG_INSTRUCTION_DECODER=y

CONFIG_OUTPUT_FORMAT="elf64-x86-64"

CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"

CONFIG_GENERIC_CMOS_UPDATE=y

CONFIG_CLOCKSOURCE_WATCHDOG=y

CONFIG_GENERIC_CLOCKEVENTS=y

CONFIG_ARCH_CLOCKSOURCE_DATA=y

CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y

CONFIG_LOCKDEP_SUPPORT=y

CONFIG_STACKTRACE_SUPPORT=y

CONFIG_HAVE_LATENCYTOP_SUPPORT=y

CONFIG_MMU=y

CONFIG_ZONE_DMA=y

CONFIG_NEED_DMA_MAP_STATE=y

CONFIG_NEED_SG_DMA_LENGTH=y

CONFIG_GENERIC_ISA_DMA=y

CONFIG_GENERIC_IOMAP=y

CONFIG_GENERIC_BUG=y

CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y

CONFIG_GENERIC_HWEIGHT=y

CONFIG_GENERIC_GPIO=y

CONFIG_ARCH_MAY_HAVE_PC_FDC=y

# CONFIG_RWSEM_GENERIC_SPINLOCK is not set

CONFIG_RWSEM_XCHGADD_ALGORITHM=y

CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y

CONFIG_GENERIC_CALIBRATE_DELAY=y

CONFIG_GENERIC_TIME_VSYSCALL=y

CONFIG_ARCH_HAS_CPU_RELAX=y

CONFIG_ARCH_HAS_DEFAULT_IDLE=y

CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y

CONFIG_HAVE_SETUP_PER_CPU_AREA=y

CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y

CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y

CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y

CONFIG_ARCH_HIBERNATION_POSSIBLE=y

CONFIG_ARCH_SUSPEND_POSSIBLE=y

CONFIG_ZONE_DMA32=y

CONFIG_ARCH_POPULATES_NODE_MAP=y

CONFIG_AUDIT_ARCH=y

CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y

CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y

CONFIG_HAVE_INTEL_TXT=y

CONFIG_X86_64_SMP=y

CONFIG_X86_HT=y

CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"

# CONFIG_KTIME_SCALAR is not set

CONFIG_ARCH_CPU_PROBE_RELEASE=y

CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

CONFIG_HAVE_IRQ_WORK=y

CONFIG_IRQ_WORK=y

#

# General setup

#

CONFIG_EXPERIMENTAL=y

CONFIG_INIT_ENV_ARG_LIMIT=32

CONFIG_CROSS_COMPILE=""

CONFIG_LOCALVERSION=""

# CONFIG_LOCALVERSION_AUTO is not set

CONFIG_HAVE_KERNEL_GZIP=y

CONFIG_HAVE_KERNEL_BZIP2=y

CONFIG_HAVE_KERNEL_LZMA=y

CONFIG_HAVE_KERNEL_XZ=y

CONFIG_HAVE_KERNEL_LZO=y

CONFIG_KERNEL_GZIP=y

# CONFIG_KERNEL_BZIP2 is not set

# CONFIG_KERNEL_LZMA is not set

# CONFIG_KERNEL_XZ is not set

# CONFIG_KERNEL_LZO is not set

CONFIG_DEFAULT_HOSTNAME="mbp82"

CONFIG_SWAP=y

CONFIG_SYSVIPC=y

CONFIG_SYSVIPC_SYSCTL=y

CONFIG_POSIX_MQUEUE=y

CONFIG_POSIX_MQUEUE_SYSCTL=y

CONFIG_BSD_PROCESS_ACCT=y

CONFIG_BSD_PROCESS_ACCT_V3=y

CONFIG_FHANDLE=y

CONFIG_TASKSTATS=y

CONFIG_TASK_DELAY_ACCT=y

CONFIG_TASK_XACCT=y

CONFIG_TASK_IO_ACCOUNTING=y

CONFIG_AUDIT=y

CONFIG_AUDITSYSCALL=y

CONFIG_AUDIT_WATCH=y

CONFIG_AUDIT_TREE=y

CONFIG_HAVE_GENERIC_HARDIRQS=y

#

# IRQ subsystem

#

CONFIG_GENERIC_HARDIRQS=y

CONFIG_HAVE_SPARSE_IRQ=y

CONFIG_GENERIC_IRQ_PROBE=y

CONFIG_GENERIC_IRQ_SHOW=y

CONFIG_GENERIC_PENDING_IRQ=y

CONFIG_IRQ_FORCED_THREADING=y

CONFIG_SPARSE_IRQ=y

#

# RCU Subsystem

#

CONFIG_TREE_RCU=y

# CONFIG_PREEMPT_RCU is not set

# CONFIG_RCU_TRACE is not set

CONFIG_RCU_FANOUT=64

# CONFIG_RCU_FANOUT_EXACT is not set

# CONFIG_RCU_FAST_NO_HZ is not set

# CONFIG_TREE_RCU_TRACE is not set

CONFIG_IKCONFIG=m

CONFIG_IKCONFIG_PROC=y

CONFIG_LOG_BUF_SHIFT=18

CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

CONFIG_CGROUPS=y

# CONFIG_CGROUP_DEBUG is not set

CONFIG_CGROUP_FREEZER=y

# CONFIG_CGROUP_DEVICE is not set

CONFIG_CPUSETS=y

CONFIG_PROC_PID_CPUSET=y

CONFIG_CGROUP_CPUACCT=y

CONFIG_RESOURCE_COUNTERS=y

# CONFIG_CGROUP_MEM_RES_CTLR is not set

# CONFIG_CGROUP_PERF is not set

CONFIG_CGROUP_SCHED=y

CONFIG_FAIR_GROUP_SCHED=y

# CONFIG_RT_GROUP_SCHED is not set

# CONFIG_BLK_CGROUP is not set

CONFIG_NAMESPACES=y

CONFIG_UTS_NS=y

CONFIG_IPC_NS=y

CONFIG_USER_NS=y

CONFIG_PID_NS=y

CONFIG_NET_NS=y

CONFIG_SCHED_AUTOGROUP=y

# CONFIG_SYSFS_DEPRECATED is not set

CONFIG_RELAY=y

CONFIG_BLK_DEV_INITRD=y

CONFIG_INITRAMFS_SOURCE=""

CONFIG_RD_GZIP=y

CONFIG_RD_BZIP2=y

CONFIG_RD_LZMA=y

CONFIG_RD_XZ=y

CONFIG_RD_LZO=y

# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set

CONFIG_SYSCTL=y

CONFIG_ANON_INODES=y

CONFIG_EXPERT=y

CONFIG_UID16=y

CONFIG_SYSCTL_SYSCALL=y

CONFIG_KALLSYMS=y

# CONFIG_KALLSYMS_ALL is not set

CONFIG_HOTPLUG=y

CONFIG_PRINTK=y

CONFIG_BUG=y

CONFIG_ELF_CORE=y

CONFIG_PCSPKR_PLATFORM=y

CONFIG_HAVE_PCSPKR_PLATFORM=y

CONFIG_BASE_FULL=y

CONFIG_FUTEX=y

CONFIG_EPOLL=y

CONFIG_SIGNALFD=y

CONFIG_TIMERFD=y

CONFIG_EVENTFD=y

CONFIG_SHMEM=y

CONFIG_AIO=y

# CONFIG_EMBEDDED is not set

CONFIG_HAVE_PERF_EVENTS=y

#

# Kernel Performance Events And Counters

#

CONFIG_PERF_EVENTS=y

# CONFIG_PERF_COUNTERS is not set

# CONFIG_DEBUG_PERF_USE_VMALLOC is not set

CONFIG_VM_EVENT_COUNTERS=y

CONFIG_PCI_QUIRKS=y

CONFIG_SLUB_DEBUG=y

# CONFIG_COMPAT_BRK is not set

# CONFIG_SLAB is not set

CONFIG_SLUB=y

# CONFIG_SLOB is not set

CONFIG_PROFILING=y

CONFIG_TRACEPOINTS=y

# CONFIG_OPROFILE is not set

CONFIG_HAVE_OPROFILE=y

CONFIG_KPROBES=y

# CONFIG_JUMP_LABEL is not set

CONFIG_OPTPROBES=y

CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y

CONFIG_KRETPROBES=y

CONFIG_USER_RETURN_NOTIFIER=y

CONFIG_HAVE_IOREMAP_PROT=y

CONFIG_HAVE_KPROBES=y

CONFIG_HAVE_KRETPROBES=y

CONFIG_HAVE_OPTPROBES=y

CONFIG_HAVE_ARCH_TRACEHOOK=y

CONFIG_HAVE_DMA_ATTRS=y

CONFIG_USE_GENERIC_SMP_HELPERS=y

CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y

CONFIG_HAVE_DMA_API_DEBUG=y

CONFIG_HAVE_HW_BREAKPOINT=y

CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y

CONFIG_HAVE_USER_RETURN_NOTIFIER=y

CONFIG_HAVE_PERF_EVENTS_NMI=y

CONFIG_HAVE_ARCH_JUMP_LABEL=y

CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y

#

# GCOV-based kernel profiling

#

# CONFIG_GCOV_KERNEL is not set

# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set

CONFIG_SLABINFO=y

CONFIG_RT_MUTEXES=y

CONFIG_BASE_SMALL=0

CONFIG_MODULES=y

# CONFIG_MODULE_FORCE_LOAD is not set

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

# CONFIG_MODVERSIONS is not set

# CONFIG_MODULE_SRCVERSION_ALL is not set

CONFIG_STOP_MACHINE=y

CONFIG_BLOCK=y

CONFIG_BLK_DEV_BSG=y

# CONFIG_BLK_DEV_BSGLIB is not set

# CONFIG_BLK_DEV_INTEGRITY is not set

CONFIG_BLOCK_COMPAT=y

#

# IO Schedulers

#

CONFIG_IOSCHED_NOOP=y

CONFIG_IOSCHED_DEADLINE=y

CONFIG_IOSCHED_CFQ=y

# CONFIG_DEFAULT_DEADLINE is not set

CONFIG_DEFAULT_CFQ=y

# CONFIG_DEFAULT_NOOP is not set

CONFIG_DEFAULT_IOSCHED="cfq"

CONFIG_PREEMPT_NOTIFIERS=y

CONFIG_PADATA=y

# CONFIG_INLINE_SPIN_TRYLOCK is not set

# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set

# CONFIG_INLINE_SPIN_LOCK is not set

# CONFIG_INLINE_SPIN_LOCK_BH is not set

# CONFIG_INLINE_SPIN_LOCK_IRQ is not set

# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set

CONFIG_INLINE_SPIN_UNLOCK=y

# CONFIG_INLINE_SPIN_UNLOCK_BH is not set

CONFIG_INLINE_SPIN_UNLOCK_IRQ=y

# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set

# CONFIG_INLINE_READ_TRYLOCK is not set

# CONFIG_INLINE_READ_LOCK is not set

# CONFIG_INLINE_READ_LOCK_BH is not set

# CONFIG_INLINE_READ_LOCK_IRQ is not set

# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set

CONFIG_INLINE_READ_UNLOCK=y

# CONFIG_INLINE_READ_UNLOCK_BH is not set

CONFIG_INLINE_READ_UNLOCK_IRQ=y

# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set

# CONFIG_INLINE_WRITE_TRYLOCK is not set

# CONFIG_INLINE_WRITE_LOCK is not set

# CONFIG_INLINE_WRITE_LOCK_BH is not set

# CONFIG_INLINE_WRITE_LOCK_IRQ is not set

# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set

CONFIG_INLINE_WRITE_UNLOCK=y

# CONFIG_INLINE_WRITE_UNLOCK_BH is not set

CONFIG_INLINE_WRITE_UNLOCK_IRQ=y

# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set

CONFIG_MUTEX_SPIN_ON_OWNER=y

CONFIG_FREEZER=y

#

# Processor type and features

#

CONFIG_TICK_ONESHOT=y

CONFIG_NO_HZ=y

CONFIG_HIGH_RES_TIMERS=y

CONFIG_GENERIC_CLOCKEVENTS_BUILD=y

CONFIG_SMP=y

# CONFIG_X86_X2APIC is not set

CONFIG_X86_MPPARSE=y

# CONFIG_X86_EXTENDED_PLATFORM is not set

CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y

CONFIG_SCHED_OMIT_FRAME_POINTER=y

# CONFIG_PARAVIRT_GUEST is not set

CONFIG_NO_BOOTMEM=y

# CONFIG_MEMTEST is not set

# CONFIG_MK8 is not set

# CONFIG_MPSC is not set

CONFIG_MCORE2=y

# CONFIG_MATOM is not set

# CONFIG_GENERIC_CPU is not set

CONFIG_X86_INTERNODE_CACHE_SHIFT=7

CONFIG_X86_CMPXCHG=y

CONFIG_CMPXCHG_LOCAL=y

CONFIG_CMPXCHG_DOUBLE=y

CONFIG_X86_L1_CACHE_SHIFT=6

CONFIG_X86_XADD=y

CONFIG_X86_WP_WORKS_OK=y

CONFIG_X86_INTEL_USERCOPY=y

CONFIG_X86_USE_PPRO_CHECKSUM=y

CONFIG_X86_P6_NOP=y

CONFIG_X86_TSC=y

CONFIG_X86_CMPXCHG64=y

CONFIG_X86_CMOV=y

CONFIG_X86_MINIMUM_CPU_FAMILY=64

CONFIG_X86_DEBUGCTLMSR=y

CONFIG_PROCESSOR_SELECT=y

CONFIG_CPU_SUP_INTEL=y

# CONFIG_CPU_SUP_AMD is not set

# CONFIG_CPU_SUP_CENTAUR is not set

CONFIG_HPET_TIMER=y

CONFIG_HPET_EMULATE_RTC=y

CONFIG_DMI=y

CONFIG_CALGARY_IOMMU=y

CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y

CONFIG_SWIOTLB=y

CONFIG_IOMMU_HELPER=y

# CONFIG_MAXSMP is not set

CONFIG_NR_CPUS=64

CONFIG_SCHED_SMT=y

CONFIG_SCHED_MC=y

# CONFIG_IRQ_TIME_ACCOUNTING is not set

# CONFIG_PREEMPT_NONE is not set

CONFIG_PREEMPT_VOLUNTARY=y

# CONFIG_PREEMPT is not set

CONFIG_X86_LOCAL_APIC=y

CONFIG_X86_IO_APIC=y

CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y

CONFIG_X86_MCE=y

CONFIG_X86_MCE_INTEL=y

# CONFIG_X86_MCE_AMD is not set

CONFIG_X86_MCE_THRESHOLD=y

# CONFIG_X86_MCE_INJECT is not set

CONFIG_X86_THERMAL_VECTOR=y

# CONFIG_I8K is not set

CONFIG_MICROCODE=y

CONFIG_MICROCODE_INTEL=y

# CONFIG_MICROCODE_AMD is not set

CONFIG_MICROCODE_OLD_INTERFACE=y

CONFIG_X86_MSR=y

CONFIG_X86_CPUID=y

CONFIG_ARCH_PHYS_ADDR_T_64BIT=y

CONFIG_ARCH_DMA_ADDR_T_64BIT=y

CONFIG_DIRECT_GBPAGES=y

CONFIG_NUMA=y

# CONFIG_AMD_NUMA is not set

CONFIG_X86_64_ACPI_NUMA=y

CONFIG_NODES_SPAN_OTHER_NODES=y

# CONFIG_NUMA_EMU is not set

CONFIG_NODES_SHIFT=6

CONFIG_ARCH_SPARSEMEM_ENABLE=y

CONFIG_ARCH_SPARSEMEM_DEFAULT=y

CONFIG_ARCH_SELECT_MEMORY_MODEL=y

CONFIG_ARCH_PROC_KCORE_TEXT=y

CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000

CONFIG_SELECT_MEMORY_MODEL=y

CONFIG_SPARSEMEM_MANUAL=y

CONFIG_SPARSEMEM=y

CONFIG_NEED_MULTIPLE_NODES=y

CONFIG_HAVE_MEMORY_PRESENT=y

CONFIG_SPARSEMEM_EXTREME=y

CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y

CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y

CONFIG_SPARSEMEM_VMEMMAP=y

CONFIG_HAVE_MEMBLOCK=y

# CONFIG_MEMORY_HOTPLUG is not set

CONFIG_PAGEFLAGS_EXTENDED=y

CONFIG_SPLIT_PTLOCK_CPUS=4

# CONFIG_COMPACTION is not set

CONFIG_MIGRATION=y

CONFIG_PHYS_ADDR_T_64BIT=y

CONFIG_ZONE_DMA_FLAG=1

CONFIG_BOUNCE=y

CONFIG_VIRT_TO_BUS=y

CONFIG_MMU_NOTIFIER=y

# CONFIG_KSM is not set

CONFIG_DEFAULT_MMAP_MIN_ADDR=4096

CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y

# CONFIG_MEMORY_FAILURE is not set

# CONFIG_TRANSPARENT_HUGEPAGE is not set

# CONFIG_CLEANCACHE is not set

CONFIG_X86_CHECK_BIOS_CORRUPTION=y

CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y

CONFIG_X86_RESERVE_LOW=64

CONFIG_MTRR=y

# CONFIG_MTRR_SANITIZER is not set

CONFIG_X86_PAT=y

CONFIG_ARCH_USES_PG_UNCACHED=y

CONFIG_EFI=y

CONFIG_SECCOMP=y

# CONFIG_CC_STACKPROTECTOR is not set

# CONFIG_HZ_100 is not set

# CONFIG_HZ_250 is not set

# CONFIG_HZ_300 is not set

CONFIG_HZ_1000=y

CONFIG_HZ=1000

CONFIG_SCHED_HRTICK=y

CONFIG_KEXEC=y

CONFIG_CRASH_DUMP=y

# CONFIG_KEXEC_JUMP is not set

CONFIG_PHYSICAL_START=0x1000000

CONFIG_RELOCATABLE=y

CONFIG_PHYSICAL_ALIGN=0x1000000

CONFIG_HOTPLUG_CPU=y

# CONFIG_COMPAT_VDSO is not set

# CONFIG_CMDLINE_BOOL is not set

CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

CONFIG_USE_PERCPU_NUMA_NODE_ID=y

#

# Power management and ACPI options

#

CONFIG_ARCH_HIBERNATION_HEADER=y

CONFIG_SUSPEND=y

CONFIG_SUSPEND_FREEZER=y

CONFIG_HIBERNATE_CALLBACKS=y

CONFIG_HIBERNATION=y

CONFIG_PM_STD_PARTITION=""

CONFIG_PM_SLEEP=y

CONFIG_PM_SLEEP_SMP=y

CONFIG_PM_RUNTIME=y

CONFIG_PM=y

# CONFIG_PM_DEBUG is not set

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

# CONFIG_ACPI_PROCFS is not set

# CONFIG_ACPI_PROCFS_POWER is not set

# CONFIG_ACPI_EC_DEBUGFS is not set

# CONFIG_ACPI_PROC_EVENT is not set

CONFIG_ACPI_AC=m

CONFIG_ACPI_BATTERY=m

CONFIG_ACPI_BUTTON=m

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_FAN=m

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_PROCESSOR=m

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_PROCESSOR_AGGREGATOR=m

CONFIG_ACPI_THERMAL=m

CONFIG_ACPI_NUMA=y

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_PCI_SLOT=m

CONFIG_X86_PM_TIMER=y

CONFIG_ACPI_CONTAINER=m

CONFIG_ACPI_SBS=m

CONFIG_ACPI_HED=m

CONFIG_ACPI_CUSTOM_METHOD=m

# CONFIG_ACPI_APEI is not set

# CONFIG_SFI is not set

#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_STAT is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=m

CONFIG_CPU_FREQ_GOV_USERSPACE=m

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#

# x86 CPU frequency scaling drivers

#

# CONFIG_X86_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=m

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_SPEEDSTEP_CENTRINO is not set

# CONFIG_X86_P4_CLOCKMOD is not set

#

# shared options

#

# CONFIG_X86_SPEEDSTEP_LIB is not set

CONFIG_CPU_IDLE=y

CONFIG_CPU_IDLE_GOV_LADDER=y

CONFIG_CPU_IDLE_GOV_MENU=y

CONFIG_INTEL_IDLE=y

#

# Memory power savings

#

CONFIG_I7300_IDLE_IOAT_CHANNEL=y

CONFIG_I7300_IDLE=m

#

# Bus options (PCI etc.)

#

CONFIG_PCI=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

CONFIG_PCI_DOMAINS=y

# CONFIG_PCI_CNB20LE_QUIRK is not set

CONFIG_PCIEPORTBUS=y

CONFIG_HOTPLUG_PCI_PCIE=m

CONFIG_PCIEAER=y

# CONFIG_PCIE_ECRC is not set

# CONFIG_PCIEAER_INJECT is not set

CONFIG_PCIEASPM=y

# CONFIG_PCIEASPM_DEBUG is not set

CONFIG_PCIE_PME=y

CONFIG_ARCH_SUPPORTS_MSI=y

CONFIG_PCI_MSI=y

# CONFIG_PCI_DEBUG is not set

# CONFIG_PCI_STUB is not set

CONFIG_HT_IRQ=y

CONFIG_PCI_IOV=y

CONFIG_PCI_IOAPIC=y

CONFIG_PCI_LABEL=y

CONFIG_ISA_DMA_API=y

# CONFIG_PCCARD is not set

CONFIG_HOTPLUG_PCI=y

CONFIG_HOTPLUG_PCI_FAKE=m

CONFIG_HOTPLUG_PCI_ACPI=m

# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set

# CONFIG_HOTPLUG_PCI_CPCI is not set

CONFIG_HOTPLUG_PCI_SHPC=m

CONFIG_RAPIDIO=y

CONFIG_RAPIDIO_DISC_TIMEOUT=30

CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS=y

CONFIG_RAPIDIO_TSI57X=y

CONFIG_RAPIDIO_CPS_XX=y

CONFIG_RAPIDIO_TSI568=y

CONFIG_RAPIDIO_CPS_GEN2=y

CONFIG_RAPIDIO_TSI500=y

CONFIG_RAPIDIO_DEBUG=y

#

# Executable file formats / Emulations

#

CONFIG_BINFMT_ELF=y

CONFIG_COMPAT_BINFMT_ELF=y

CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y

# CONFIG_HAVE_AOUT is not set

CONFIG_BINFMT_MISC=y

CONFIG_IA32_EMULATION=y

CONFIG_IA32_AOUT=m

CONFIG_COMPAT=y

CONFIG_COMPAT_FOR_U64_ALIGNMENT=y

CONFIG_SYSVIPC_COMPAT=y

CONFIG_KEYS_COMPAT=y

CONFIG_HAVE_TEXT_POKE_SMP=y

CONFIG_NET=y

CONFIG_COMPAT_NETLINK_MESSAGES=y

#

# Networking options

#

CONFIG_PACKET=m

CONFIG_UNIX=m

CONFIG_XFRM=y

CONFIG_XFRM_USER=m

# CONFIG_XFRM_SUB_POLICY is not set

# CONFIG_XFRM_MIGRATE is not set

# CONFIG_XFRM_STATISTICS is not set

# CONFIG_NET_KEY is not set

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IP_ADVANCED_ROUTER=y

# CONFIG_IP_FIB_TRIE_STATS is not set

CONFIG_IP_MULTIPLE_TABLES=y

CONFIG_IP_ROUTE_MULTIPATH=y

CONFIG_IP_ROUTE_VERBOSE=y

CONFIG_IP_ROUTE_CLASSID=y

CONFIG_IP_PNP=y

CONFIG_IP_PNP_DHCP=y

CONFIG_IP_PNP_BOOTP=y

CONFIG_IP_PNP_RARP=y

# CONFIG_NET_IPIP is not set

# CONFIG_NET_IPGRE_DEMUX is not set

CONFIG_IP_MROUTE=y

# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set

CONFIG_IP_PIMSM_V1=y

CONFIG_IP_PIMSM_V2=y

# CONFIG_ARPD is not set

CONFIG_SYN_COOKIES=y

# CONFIG_INET_AH is not set

# CONFIG_INET_ESP is not set

# CONFIG_INET_IPCOMP is not set

# CONFIG_INET_XFRM_TUNNEL is not set

CONFIG_INET_TUNNEL=m

# CONFIG_INET_XFRM_MODE_TRANSPORT is not set

# CONFIG_INET_XFRM_MODE_TUNNEL is not set

# CONFIG_INET_XFRM_MODE_BEET is not set

CONFIG_INET_LRO=m

# CONFIG_INET_DIAG is not set

CONFIG_TCP_CONG_ADVANCED=y

CONFIG_TCP_CONG_BIC=m

CONFIG_TCP_CONG_CUBIC=m

CONFIG_TCP_CONG_WESTWOOD=m

CONFIG_TCP_CONG_HTCP=m

CONFIG_TCP_CONG_HSTCP=m

CONFIG_TCP_CONG_HYBLA=m

CONFIG_TCP_CONG_VEGAS=m

CONFIG_TCP_CONG_SCALABLE=m

CONFIG_TCP_CONG_LP=m

CONFIG_TCP_CONG_VENO=m

CONFIG_TCP_CONG_YEAH=m

CONFIG_TCP_CONG_ILLINOIS=m

CONFIG_DEFAULT_RENO=y

CONFIG_DEFAULT_TCP_CONG="reno"

CONFIG_TCP_MD5SIG=y

CONFIG_IPV6=m

# CONFIG_IPV6_PRIVACY is not set

# CONFIG_IPV6_ROUTER_PREF is not set

# CONFIG_IPV6_OPTIMISTIC_DAD is not set

CONFIG_INET6_AH=m

CONFIG_INET6_ESP=m

# CONFIG_INET6_IPCOMP is not set

# CONFIG_IPV6_MIP6 is not set

# CONFIG_INET6_XFRM_TUNNEL is not set

# CONFIG_INET6_TUNNEL is not set

CONFIG_INET6_XFRM_MODE_TRANSPORT=m

CONFIG_INET6_XFRM_MODE_TUNNEL=m

CONFIG_INET6_XFRM_MODE_BEET=m

# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set

CONFIG_IPV6_SIT=m

# CONFIG_IPV6_SIT_6RD is not set

CONFIG_IPV6_NDISC_NODETYPE=y

# CONFIG_IPV6_TUNNEL is not set

# CONFIG_IPV6_MULTIPLE_TABLES is not set

# CONFIG_IPV6_MROUTE is not set

CONFIG_NETLABEL=y

CONFIG_NETWORK_SECMARK=y

# CONFIG_NETWORK_PHY_TIMESTAMPING is not set

CONFIG_NETFILTER=y

# CONFIG_NETFILTER_DEBUG is not set

CONFIG_NETFILTER_ADVANCED=y

CONFIG_BRIDGE_NETFILTER=y

#

# Core Netfilter Configuration

#

CONFIG_NETFILTER_NETLINK=y

CONFIG_NETFILTER_NETLINK_QUEUE=m

CONFIG_NETFILTER_NETLINK_LOG=y

CONFIG_NF_CONNTRACK=m

CONFIG_NF_CONNTRACK_MARK=y

CONFIG_NF_CONNTRACK_SECMARK=y

# CONFIG_NF_CONNTRACK_EVENTS is not set

# CONFIG_NF_CONNTRACK_TIMESTAMP is not set

# CONFIG_NF_CT_PROTO_DCCP is not set

CONFIG_NF_CT_PROTO_SCTP=m

CONFIG_NF_CT_PROTO_UDPLITE=m

# CONFIG_NF_CONNTRACK_AMANDA is not set

CONFIG_NF_CONNTRACK_FTP=m

CONFIG_NF_CONNTRACK_H323=m

CONFIG_NF_CONNTRACK_IRC=m

CONFIG_NF_CONNTRACK_BROADCAST=m

CONFIG_NF_CONNTRACK_NETBIOS_NS=m

CONFIG_NF_CONNTRACK_SNMP=m

# CONFIG_NF_CONNTRACK_PPTP is not set

# CONFIG_NF_CONNTRACK_SANE is not set

CONFIG_NF_CONNTRACK_SIP=m

# CONFIG_NF_CONNTRACK_TFTP is not set

CONFIG_NF_CT_NETLINK=m

# CONFIG_NETFILTER_TPROXY is not set

CONFIG_NETFILTER_XTABLES=y

#

# Xtables combined modules

#

CONFIG_NETFILTER_XT_MARK=m

CONFIG_NETFILTER_XT_CONNMARK=m

#

# Xtables targets

#

# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set

# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set

# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set

CONFIG_NETFILTER_XT_TARGET_CONNMARK=m

CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m

CONFIG_NETFILTER_XT_TARGET_DSCP=m

# CONFIG_NETFILTER_XT_TARGET_HL is not set

# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set

# CONFIG_NETFILTER_XT_TARGET_LED is not set

# CONFIG_NETFILTER_XT_TARGET_MARK is not set

CONFIG_NETFILTER_XT_TARGET_NFLOG=y

# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set

# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set

# CONFIG_NETFILTER_XT_TARGET_TEE is not set

CONFIG_NETFILTER_XT_TARGET_SECMARK=y

CONFIG_NETFILTER_XT_TARGET_TCPMSS=m

# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set

#

# Xtables matches

#

# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set

# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set

# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set

# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set

# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set

# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set

CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m

# CONFIG_NETFILTER_XT_MATCH_CPU is not set

# CONFIG_NETFILTER_XT_MATCH_DCCP is not set

# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set

# CONFIG_NETFILTER_XT_MATCH_DSCP is not set

# CONFIG_NETFILTER_XT_MATCH_ESP is not set

# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set

# CONFIG_NETFILTER_XT_MATCH_HELPER is not set

# CONFIG_NETFILTER_XT_MATCH_HL is not set

# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set

# CONFIG_NETFILTER_XT_MATCH_IPVS is not set

# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set

# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set

# CONFIG_NETFILTER_XT_MATCH_MAC is not set

# CONFIG_NETFILTER_XT_MATCH_MARK is not set

# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set

# CONFIG_NETFILTER_XT_MATCH_OSF is not set

# CONFIG_NETFILTER_XT_MATCH_OWNER is not set

CONFIG_NETFILTER_XT_MATCH_POLICY=m

# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set

# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set

# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set

# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set

# CONFIG_NETFILTER_XT_MATCH_REALM is not set

# CONFIG_NETFILTER_XT_MATCH_RECENT is not set

CONFIG_NETFILTER_XT_MATCH_SCTP=m

CONFIG_NETFILTER_XT_MATCH_STATE=m

# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set

# CONFIG_NETFILTER_XT_MATCH_STRING is not set

CONFIG_NETFILTER_XT_MATCH_TCPMSS=m

# CONFIG_NETFILTER_XT_MATCH_TIME is not set

CONFIG_NETFILTER_XT_MATCH_U32=m

# CONFIG_IP_SET is not set

CONFIG_IP_VS=m

CONFIG_IP_VS_IPV6=y

# CONFIG_IP_VS_DEBUG is not set

CONFIG_IP_VS_TAB_BITS=12

#

# IPVS transport protocol load balancing support

#

CONFIG_IP_VS_PROTO_TCP=y

CONFIG_IP_VS_PROTO_UDP=y

CONFIG_IP_VS_PROTO_AH_ESP=y

CONFIG_IP_VS_PROTO_ESP=y

CONFIG_IP_VS_PROTO_AH=y

CONFIG_IP_VS_PROTO_SCTP=y

#

# IPVS scheduler

#

CONFIG_IP_VS_RR=m

CONFIG_IP_VS_WRR=m

CONFIG_IP_VS_LC=m

CONFIG_IP_VS_WLC=m

CONFIG_IP_VS_LBLC=m

CONFIG_IP_VS_LBLCR=m

CONFIG_IP_VS_DH=m

CONFIG_IP_VS_SH=m

CONFIG_IP_VS_SED=m

CONFIG_IP_VS_NQ=m

#

# IPVS application helper

#

CONFIG_IP_VS_FTP=m

CONFIG_IP_VS_NFCT=y

CONFIG_IP_VS_PE_SIP=m

#

# IP: Netfilter Configuration

#

CONFIG_NF_DEFRAG_IPV4=m

CONFIG_NF_CONNTRACK_IPV4=m

CONFIG_NF_CONNTRACK_PROC_COMPAT=y

# CONFIG_IP_NF_QUEUE is not set

CONFIG_IP_NF_IPTABLES=m

# CONFIG_IP_NF_MATCH_AH is not set

# CONFIG_IP_NF_MATCH_ECN is not set

# CONFIG_IP_NF_MATCH_TTL is not set

CONFIG_IP_NF_FILTER=m

CONFIG_IP_NF_TARGET_REJECT=m

CONFIG_IP_NF_TARGET_LOG=m

CONFIG_IP_NF_TARGET_ULOG=m

CONFIG_NF_NAT=m

CONFIG_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=m

# CONFIG_IP_NF_TARGET_NETMAP is not set

CONFIG_IP_NF_TARGET_REDIRECT=m

CONFIG_NF_NAT_SNMP_BASIC=m

CONFIG_NF_NAT_PROTO_UDPLITE=m

CONFIG_NF_NAT_PROTO_SCTP=m

CONFIG_NF_NAT_FTP=m

CONFIG_NF_NAT_IRC=m

# CONFIG_NF_NAT_TFTP is not set

# CONFIG_NF_NAT_AMANDA is not set

# CONFIG_NF_NAT_PPTP is not set

CONFIG_NF_NAT_H323=m

CONFIG_NF_NAT_SIP=m

CONFIG_IP_NF_MANGLE=m

# CONFIG_IP_NF_TARGET_CLUSTERIP is not set

# CONFIG_IP_NF_TARGET_ECN is not set

# CONFIG_IP_NF_TARGET_TTL is not set

# CONFIG_IP_NF_RAW is not set

CONFIG_IP_NF_SECURITY=m

CONFIG_IP_NF_ARPTABLES=m

CONFIG_IP_NF_ARPFILTER=m

CONFIG_IP_NF_ARP_MANGLE=m

#

# IPv6: Netfilter Configuration

#

CONFIG_NF_DEFRAG_IPV6=m

CONFIG_NF_CONNTRACK_IPV6=m

# CONFIG_IP6_NF_QUEUE is not set

CONFIG_IP6_NF_IPTABLES=m

# CONFIG_IP6_NF_MATCH_AH is not set

# CONFIG_IP6_NF_MATCH_EUI64 is not set

# CONFIG_IP6_NF_MATCH_FRAG is not set

# CONFIG_IP6_NF_MATCH_OPTS is not set

# CONFIG_IP6_NF_MATCH_HL is not set

CONFIG_IP6_NF_MATCH_IPV6HEADER=m

# CONFIG_IP6_NF_MATCH_MH is not set

# CONFIG_IP6_NF_MATCH_RT is not set

# CONFIG_IP6_NF_TARGET_HL is not set

CONFIG_IP6_NF_TARGET_LOG=m

CONFIG_IP6_NF_FILTER=m

CONFIG_IP6_NF_TARGET_REJECT=m

CONFIG_IP6_NF_MANGLE=m

# CONFIG_IP6_NF_RAW is not set

CONFIG_IP6_NF_SECURITY=m

# CONFIG_BRIDGE_NF_EBTABLES is not set

# CONFIG_IP_DCCP is not set

CONFIG_IP_SCTP=m

# CONFIG_NET_SCTPPROBE is not set

# CONFIG_SCTP_DBG_MSG is not set

# CONFIG_SCTP_DBG_OBJCNT is not set

# CONFIG_SCTP_HMAC_NONE is not set

# CONFIG_SCTP_HMAC_SHA1 is not set

CONFIG_SCTP_HMAC_MD5=y

# CONFIG_RDS is not set

# CONFIG_TIPC is not set

# CONFIG_ATM is not set

# CONFIG_L2TP is not set

CONFIG_STP=m

CONFIG_BRIDGE=m

CONFIG_BRIDGE_IGMP_SNOOPING=y

# CONFIG_NET_DSA is not set

CONFIG_VLAN_8021Q=m

# CONFIG_VLAN_8021Q_GVRP is not set

# CONFIG_DECNET is not set

CONFIG_LLC=m

# CONFIG_LLC2 is not set

# CONFIG_IPX is not set

# CONFIG_ATALK is not set

# CONFIG_X25 is not set

# CONFIG_LAPB is not set

# CONFIG_ECONET is not set

# CONFIG_WAN_ROUTER is not set

# CONFIG_PHONET is not set

CONFIG_IEEE802154=m

CONFIG_NET_SCHED=y

#

# Queueing/Scheduling

#

CONFIG_NET_SCH_CBQ=m

CONFIG_NET_SCH_HTB=m

CONFIG_NET_SCH_HFSC=m

CONFIG_NET_SCH_PRIO=m

CONFIG_NET_SCH_MULTIQ=m

CONFIG_NET_SCH_RED=m

CONFIG_NET_SCH_SFB=m

CONFIG_NET_SCH_SFQ=m

CONFIG_NET_SCH_TEQL=m

CONFIG_NET_SCH_TBF=m

CONFIG_NET_SCH_GRED=m

CONFIG_NET_SCH_DSMARK=m

CONFIG_NET_SCH_NETEM=m

CONFIG_NET_SCH_DRR=m

CONFIG_NET_SCH_MQPRIO=m

CONFIG_NET_SCH_CHOKE=m

CONFIG_NET_SCH_QFQ=m

CONFIG_NET_SCH_INGRESS=m

#

# Classification

#

CONFIG_NET_CLS=y

CONFIG_NET_CLS_BASIC=m

CONFIG_NET_CLS_TCINDEX=m

CONFIG_NET_CLS_ROUTE4=m

CONFIG_NET_CLS_FW=m

CONFIG_NET_CLS_U32=m

CONFIG_CLS_U32_PERF=y

CONFIG_CLS_U32_MARK=y

CONFIG_NET_CLS_RSVP=m

CONFIG_NET_CLS_RSVP6=m

CONFIG_NET_CLS_FLOW=m

CONFIG_NET_CLS_CGROUP=m

CONFIG_NET_EMATCH=y

CONFIG_NET_EMATCH_STACK=32

CONFIG_NET_EMATCH_CMP=m

CONFIG_NET_EMATCH_NBYTE=m

CONFIG_NET_EMATCH_U32=m

CONFIG_NET_EMATCH_META=m

CONFIG_NET_EMATCH_TEXT=m

CONFIG_NET_CLS_ACT=y

CONFIG_NET_ACT_POLICE=m

CONFIG_NET_ACT_GACT=m

# CONFIG_GACT_PROB is not set

CONFIG_NET_ACT_MIRRED=m

CONFIG_NET_ACT_IPT=m

CONFIG_NET_ACT_NAT=m

CONFIG_NET_ACT_PEDIT=m

# CONFIG_NET_ACT_SIMP is not set

CONFIG_NET_ACT_SKBEDIT=m

CONFIG_NET_ACT_CSUM=m

CONFIG_NET_CLS_IND=y

CONFIG_NET_SCH_FIFO=y

# CONFIG_DCB is not set

CONFIG_DNS_RESOLVER=y

# CONFIG_BATMAN_ADV is not set

CONFIG_RPS=y

CONFIG_RFS_ACCEL=y

CONFIG_XPS=y

CONFIG_HAVE_BPF_JIT=y

# CONFIG_BPF_JIT is not set

#

# Network testing

#

# CONFIG_NET_PKTGEN is not set

# CONFIG_NET_TCPPROBE is not set

# CONFIG_NET_DROP_MONITOR is not set

# CONFIG_HAMRADIO is not set

# CONFIG_CAN is not set

# CONFIG_IRDA is not set

CONFIG_BT=m

CONFIG_BT_L2CAP=y

CONFIG_BT_SCO=y

CONFIG_BT_RFCOMM=m

CONFIG_BT_RFCOMM_TTY=y

CONFIG_BT_BNEP=m

CONFIG_BT_BNEP_MC_FILTER=y

CONFIG_BT_BNEP_PROTO_FILTER=y

CONFIG_BT_HIDP=m

#

# Bluetooth device drivers

#

CONFIG_BT_HCIBTUSB=m

# CONFIG_BT_HCIBTSDIO is not set

# CONFIG_BT_HCIUART is not set

CONFIG_BT_HCIBCM203X=m

CONFIG_BT_HCIBPA10X=m

CONFIG_BT_HCIBFUSB=m

CONFIG_BT_HCIVHCI=m

CONFIG_BT_MRVL=m

# CONFIG_BT_MRVL_SDIO is not set

CONFIG_BT_ATH3K=m

CONFIG_AF_RXRPC=m

# CONFIG_AF_RXRPC_DEBUG is not set

# CONFIG_RXKAD is not set

CONFIG_FIB_RULES=y

CONFIG_WIRELESS=y

CONFIG_WIRELESS_EXT=y

CONFIG_WEXT_CORE=y

CONFIG_WEXT_PROC=y

CONFIG_WEXT_PRIV=y

CONFIG_CFG80211=m

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

CONFIG_CFG80211_DEFAULT_PS=y

# CONFIG_CFG80211_DEBUGFS is not set

# CONFIG_CFG80211_INTERNAL_REGDB is not set

CONFIG_CFG80211_WEXT=y

CONFIG_WIRELESS_EXT_SYSFS=y

CONFIG_LIB80211=m

# CONFIG_LIB80211_DEBUG is not set

CONFIG_MAC80211=m

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_PID=y

CONFIG_MAC80211_RC_MINSTREL=y

CONFIG_MAC80211_RC_MINSTREL_HT=y

# CONFIG_MAC80211_RC_DEFAULT_PID is not set

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"

CONFIG_MAC80211_MESH=y

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

CONFIG_WIMAX=m

CONFIG_WIMAX_DEBUG_LEVEL=8

CONFIG_RFKILL=m

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

# CONFIG_NET_9P is not set

# CONFIG_CAIF is not set

# CONFIG_CEPH_LIB is not set

# CONFIG_NFC is not set

#

# Device Drivers

#

#

# Generic Driver Options

#

CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm"

CONFIG_DEVTMPFS=y

CONFIG_DEVTMPFS_MOUNT=y

CONFIG_STANDALONE=y

CONFIG_PREVENT_FIRMWARE_BUILD=y

CONFIG_FW_LOADER=y

# CONFIG_FIRMWARE_IN_KERNEL is not set

CONFIG_EXTRA_FIRMWARE=""

# CONFIG_DEBUG_DRIVER is not set

# CONFIG_DEBUG_DEVRES is not set

# CONFIG_SYS_HYPERVISOR is not set

CONFIG_CONNECTOR=y

CONFIG_PROC_EVENTS=y

# CONFIG_MTD is not set

# CONFIG_PARPORT is not set

CONFIG_PNP=y

# CONFIG_PNP_DEBUG_MESSAGES is not set

#

# Protocols

#

CONFIG_PNPACPI=y

CONFIG_BLK_DEV=y

# CONFIG_BLK_DEV_FD is not set

# CONFIG_BLK_CPQ_DA is not set

# CONFIG_BLK_CPQ_CISS_DA is not set

# CONFIG_BLK_DEV_DAC960 is not set

# CONFIG_BLK_DEV_UMEM is not set

# CONFIG_BLK_DEV_COW_COMMON is not set

CONFIG_BLK_DEV_LOOP=m

CONFIG_BLK_DEV_LOOP_MIN_COUNT=8

# CONFIG_BLK_DEV_CRYPTOLOOP is not set

# CONFIG_BLK_DEV_DRBD is not set

# CONFIG_BLK_DEV_NBD is not set

# CONFIG_BLK_DEV_SX8 is not set

# CONFIG_BLK_DEV_UB is not set

CONFIG_BLK_DEV_RAM=m

CONFIG_BLK_DEV_RAM_COUNT=16

CONFIG_BLK_DEV_RAM_SIZE=16384

# CONFIG_BLK_DEV_XIP is not set

CONFIG_CDROM_PKTCDVD=m

CONFIG_CDROM_PKTCDVD_BUFFERS=8

# CONFIG_CDROM_PKTCDVD_WCACHE is not set

# CONFIG_ATA_OVER_ETH is not set

# CONFIG_BLK_DEV_HD is not set

# CONFIG_BLK_DEV_RBD is not set

# CONFIG_SENSORS_LIS3LV02D is not set

CONFIG_MISC_DEVICES=y

# CONFIG_AD525X_DPOT is not set

# CONFIG_IBM_ASM is not set

# CONFIG_PHANTOM is not set

# CONFIG_INTEL_MID_PTI is not set

# CONFIG_SGI_IOC4 is not set

# CONFIG_TIFM_CORE is not set

# CONFIG_ICS932S401 is not set

# CONFIG_ENCLOSURE_SERVICES is not set

# CONFIG_HP_ILO is not set

# CONFIG_APDS9802ALS is not set

# CONFIG_ISL29003 is not set

# CONFIG_ISL29020 is not set

# CONFIG_SENSORS_TSL2550 is not set

# CONFIG_SENSORS_BH1780 is not set

# CONFIG_SENSORS_BH1770 is not set

# CONFIG_SENSORS_APDS990X is not set

# CONFIG_HMC6352 is not set

# CONFIG_DS1682 is not set

# CONFIG_VMWARE_BALLOON is not set

# CONFIG_BMP085 is not set

# CONFIG_PCH_PHUB is not set

# CONFIG_USB_SWITCH_FSA9480 is not set

# CONFIG_C2PORT is not set

#

# EEPROM support

#

# CONFIG_EEPROM_AT24 is not set

# CONFIG_EEPROM_LEGACY is not set

# CONFIG_EEPROM_MAX6875 is not set

# CONFIG_EEPROM_93CX6 is not set

CONFIG_CB710_CORE=m

# CONFIG_CB710_DEBUG is not set

CONFIG_CB710_DEBUG_ASSUMPTIONS=y

# CONFIG_IWMC3200TOP is not set

#

# Texas Instruments shared transport line discipline

#

# CONFIG_TI_ST is not set

# CONFIG_SENSORS_LIS3_I2C is not set

CONFIG_HAVE_IDE=y

# CONFIG_IDE is not set

#

# SCSI device support

#

CONFIG_SCSI_MOD=y

CONFIG_RAID_ATTRS=m

CONFIG_SCSI=y

CONFIG_SCSI_DMA=y

CONFIG_SCSI_TGT=m

# CONFIG_SCSI_NETLINK is not set

# CONFIG_SCSI_PROC_FS is not set

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=m

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

CONFIG_BLK_DEV_SR=m

# CONFIG_BLK_DEV_SR_VENDOR is not set

CONFIG_CHR_DEV_SG=m

# CONFIG_CHR_DEV_SCH is not set

# CONFIG_SCSI_MULTI_LUN is not set

# CONFIG_SCSI_CONSTANTS is not set

# CONFIG_SCSI_LOGGING is not set

CONFIG_SCSI_SCAN_ASYNC=y

CONFIG_SCSI_WAIT_SCAN=m

#

# SCSI Transports

#

CONFIG_SCSI_SPI_ATTRS=y

# CONFIG_SCSI_FC_ATTRS is not set

CONFIG_SCSI_ISCSI_ATTRS=m

CONFIG_SCSI_SAS_ATTRS=m

CONFIG_SCSI_SAS_LIBSAS=m

CONFIG_SCSI_SAS_ATA=y

CONFIG_SCSI_SAS_HOST_SMP=y

CONFIG_SCSI_SRP_ATTRS=m

CONFIG_SCSI_SRP_TGT_ATTRS=y

# CONFIG_SCSI_LOWLEVEL is not set

# CONFIG_SCSI_DH is not set

# CONFIG_SCSI_OSD_INITIATOR is not set

CONFIG_ATA=m

# CONFIG_ATA_NONSTANDARD is not set

# CONFIG_ATA_VERBOSE_ERROR is not set

CONFIG_ATA_ACPI=y

CONFIG_SATA_PMP=y

#

# Controllers with non-SFF native interface

#

CONFIG_SATA_AHCI=m

# CONFIG_SATA_AHCI_PLATFORM is not set

# CONFIG_SATA_INIC162X is not set

# CONFIG_SATA_ACARD_AHCI is not set

CONFIG_SATA_SIL24=m

CONFIG_ATA_SFF=y

#

# SFF controllers with custom DMA interface

#

# CONFIG_PDC_ADMA is not set

# CONFIG_SATA_QSTOR is not set

# CONFIG_SATA_SX4 is not set

CONFIG_ATA_BMDMA=y

#

# SATA SFF controllers with BMDMA

#

# CONFIG_ATA_PIIX is not set

# CONFIG_SATA_MV is not set

# CONFIG_SATA_NV is not set

# CONFIG_SATA_PROMISE is not set

CONFIG_SATA_SIL=m

# CONFIG_SATA_SIS is not set

# CONFIG_SATA_SVW is not set

# CONFIG_SATA_ULI is not set

# CONFIG_SATA_VIA is not set

# CONFIG_SATA_VITESSE is not set

#

# PATA SFF controllers with BMDMA

#

# CONFIG_PATA_ALI is not set

# CONFIG_PATA_AMD is not set

# CONFIG_PATA_ARASAN_CF is not set

# CONFIG_PATA_ARTOP is not set

# CONFIG_PATA_ATIIXP is not set

# CONFIG_PATA_ATP867X is not set

# CONFIG_PATA_CMD64X is not set

# CONFIG_PATA_CS5520 is not set

# CONFIG_PATA_CS5530 is not set

# CONFIG_PATA_CS5536 is not set

# CONFIG_PATA_CYPRESS is not set

# CONFIG_PATA_EFAR is not set

# CONFIG_PATA_HPT366 is not set

# CONFIG_PATA_HPT37X is not set

# CONFIG_PATA_HPT3X2N is not set

# CONFIG_PATA_HPT3X3 is not set

# CONFIG_PATA_IT8213 is not set

# CONFIG_PATA_IT821X is not set

# CONFIG_PATA_JMICRON is not set

# CONFIG_PATA_MARVELL is not set

# CONFIG_PATA_NETCELL is not set

# CONFIG_PATA_NINJA32 is not set

# CONFIG_PATA_NS87415 is not set

# CONFIG_PATA_OLDPIIX is not set

# CONFIG_PATA_OPTIDMA is not set

# CONFIG_PATA_PDC2027X is not set

# CONFIG_PATA_PDC_OLD is not set

# CONFIG_PATA_RADISYS is not set

# CONFIG_PATA_RDC is not set

# CONFIG_PATA_SC1200 is not set

# CONFIG_PATA_SCH is not set

# CONFIG_PATA_SERVERWORKS is not set

# CONFIG_PATA_SIL680 is not set

# CONFIG_PATA_SIS is not set

# CONFIG_PATA_TOSHIBA is not set

# CONFIG_PATA_TRIFLEX is not set

# CONFIG_PATA_VIA is not set

# CONFIG_PATA_WINBOND is not set

#

# PIO-only SFF controllers

#

# CONFIG_PATA_CMD640_PCI is not set

# CONFIG_PATA_MPIIX is not set

# CONFIG_PATA_NS87410 is not set

# CONFIG_PATA_OPTI is not set

# CONFIG_PATA_PLATFORM is not set

# CONFIG_PATA_RZ1000 is not set

#

# Generic fallback / legacy drivers

#

# CONFIG_PATA_ACPI is not set

# CONFIG_ATA_GENERIC is not set

# CONFIG_PATA_LEGACY is not set

CONFIG_MD=y

# CONFIG_BLK_DEV_MD is not set

CONFIG_BLK_DEV_DM=m

# CONFIG_DM_DEBUG is not set

CONFIG_DM_CRYPT=m

CONFIG_DM_SNAPSHOT=m

CONFIG_DM_MIRROR=m

# CONFIG_DM_RAID is not set

# CONFIG_DM_LOG_USERSPACE is not set

CONFIG_DM_ZERO=m

CONFIG_DM_MULTIPATH=m

CONFIG_DM_MULTIPATH_QL=m

CONFIG_DM_MULTIPATH_ST=m

CONFIG_DM_DELAY=m

CONFIG_DM_UEVENT=y

CONFIG_DM_FLAKEY=m

CONFIG_TARGET_CORE=m

CONFIG_TCM_IBLOCK=m

CONFIG_TCM_FILEIO=m

CONFIG_TCM_PSCSI=m

CONFIG_LOOPBACK_TARGET=m

CONFIG_ISCSI_TARGET=m

CONFIG_FUSION=y

# CONFIG_FUSION_SPI is not set

# CONFIG_FUSION_FC is not set

CONFIG_FUSION_SAS=m

CONFIG_FUSION_MAX_SGE=128

CONFIG_FUSION_CTL=m

# CONFIG_FUSION_LOGGING is not set

#

# IEEE 1394 (FireWire) support

#

CONFIG_FIREWIRE=m

CONFIG_FIREWIRE_OHCI=m

CONFIG_FIREWIRE_OHCI_DEBUG=y

CONFIG_FIREWIRE_SBP2=m

CONFIG_FIREWIRE_NET=m

# CONFIG_FIREWIRE_NOSY is not set

# CONFIG_I2O is not set

CONFIG_MACINTOSH_DRIVERS=y

CONFIG_MAC_EMUMOUSEBTN=m

CONFIG_NETDEVICES=y

CONFIG_IFB=m

# CONFIG_DUMMY is not set

CONFIG_BONDING=m

# CONFIG_MACVLAN is not set

# CONFIG_EQUALIZER is not set

CONFIG_TUN=m

CONFIG_VETH=m

# CONFIG_NET_SB1000 is not set

# CONFIG_ARCNET is not set

CONFIG_MII=y

CONFIG_PHYLIB=y

#

# MII PHY device drivers

#

# CONFIG_MARVELL_PHY is not set

# CONFIG_DAVICOM_PHY is not set

# CONFIG_QSEMI_PHY is not set

# CONFIG_LXT_PHY is not set

# CONFIG_CICADA_PHY is not set

# CONFIG_VITESSE_PHY is not set

# CONFIG_SMSC_PHY is not set

CONFIG_BROADCOM_PHY=m

# CONFIG_ICPLUS_PHY is not set

# CONFIG_REALTEK_PHY is not set

# CONFIG_NATIONAL_PHY is not set

# CONFIG_STE10XP is not set

# CONFIG_LSI_ET1011C_PHY is not set

# CONFIG_MICREL_PHY is not set

# CONFIG_FIXED_PHY is not set

# CONFIG_MDIO_BITBANG is not set

# CONFIG_NET_ETHERNET is not set

CONFIG_NETDEV_1000=y

# CONFIG_ACENIC is not set

# CONFIG_DL2K is not set

# CONFIG_E1000 is not set

# CONFIG_E1000E is not set

# CONFIG_IP1000 is not set

# CONFIG_IGB is not set

# CONFIG_IGBVF is not set

# CONFIG_NS83820 is not set

# CONFIG_HAMACHI is not set

# CONFIG_YELLOWFIN is not set

# CONFIG_R8169 is not set

# CONFIG_SIS190 is not set

# CONFIG_SKGE is not set

# CONFIG_SKY2 is not set

# CONFIG_VIA_VELOCITY is not set

CONFIG_TIGON3=m

# CONFIG_BNX2 is not set

# CONFIG_CNIC is not set

# CONFIG_QLA3XXX is not set

# CONFIG_ATL1 is not set

# CONFIG_ATL1E is not set

# CONFIG_ATL1C is not set

# CONFIG_JME is not set

# CONFIG_STMMAC_ETH is not set

# CONFIG_PCH_GBE is not set

# CONFIG_NETDEV_10000 is not set

# CONFIG_TR is not set

CONFIG_WLAN=y

# CONFIG_LIBERTAS_THINFIRM is not set

# CONFIG_AIRO is not set

# CONFIG_ATMEL is not set

# CONFIG_AT76C50X_USB is not set

# CONFIG_PRISM54 is not set

# CONFIG_USB_ZD1201 is not set

# CONFIG_USB_NET_RNDIS_WLAN is not set

# CONFIG_RTL8180 is not set

# CONFIG_RTL8187 is not set

# CONFIG_ADM8211 is not set

# CONFIG_MAC80211_HWSIM is not set

# CONFIG_MWL8K is not set

# CONFIG_ATH_COMMON is not set

CONFIG_B43=m

CONFIG_B43_BCMA=y

CONFIG_B43_SSB=y

CONFIG_B43_PCI_AUTOSELECT=y

CONFIG_B43_PCICORE_AUTOSELECT=y

CONFIG_B43_SDIO=y

CONFIG_B43_BCMA_PIO=y

CONFIG_B43_PIO=y

CONFIG_B43_PHY_N=y

CONFIG_B43_PHY_LP=y

CONFIG_B43_PHY_HT=y

CONFIG_B43_LEDS=y

CONFIG_B43_HWRNG=y

# CONFIG_B43_DEBUG is not set

# CONFIG_B43LEGACY is not set

# CONFIG_HOSTAP is not set

# CONFIG_IPW2100 is not set

# CONFIG_IPW2200 is not set

# CONFIG_IWLAGN is not set

# CONFIG_IWL4965 is not set

# CONFIG_IWL3945 is not set

# CONFIG_IWM is not set

# CONFIG_LIBERTAS is not set

# CONFIG_HERMES is not set

# CONFIG_P54_COMMON is not set

CONFIG_RT2X00=m

# CONFIG_RT2400PCI is not set

# CONFIG_RT2500PCI is not set

# CONFIG_RT61PCI is not set

# CONFIG_RT2800PCI is not set

CONFIG_RT2500USB=m

CONFIG_RT73USB=m

CONFIG_RT2800USB=m

CONFIG_RT2800USB_RT33XX=y

CONFIG_RT2800USB_RT35XX=y

CONFIG_RT2800USB_RT53XX=y

CONFIG_RT2800USB_UNKNOWN=y

CONFIG_RT2800_LIB=m

CONFIG_RT2X00_LIB_USB=m

CONFIG_RT2X00_LIB=m

CONFIG_RT2X00_LIB_FIRMWARE=y

CONFIG_RT2X00_LIB_CRYPTO=y

CONFIG_RT2X00_LIB_LEDS=y

# CONFIG_RT2X00_DEBUG is not set

# CONFIG_RTL8192CE is not set

# CONFIG_RTL8192SE is not set

# CONFIG_RTL8192DE is not set

# CONFIG_RTL8192CU is not set

# CONFIG_WL1251 is not set

# CONFIG_WL12XX_MENU is not set

# CONFIG_ZD1211RW is not set

# CONFIG_MWIFIEX is not set

#

# WiMAX Wireless Broadband devices

#

# CONFIG_WIMAX_I2400M_USB is not set

# CONFIG_WIMAX_I2400M_SDIO is not set

#

# USB Network Adapters

#

# CONFIG_USB_CATC is not set

# CONFIG_USB_KAWETH is not set

# CONFIG_USB_PEGASUS is not set

# CONFIG_USB_RTL8150 is not set

CONFIG_USB_USBNET=m

CONFIG_USB_NET_AX8817X=m

CONFIG_USB_NET_CDCETHER=m

# CONFIG_USB_NET_CDC_EEM is not set

CONFIG_USB_NET_CDC_NCM=m

# CONFIG_USB_NET_DM9601 is not set

# CONFIG_USB_NET_SMSC75XX is not set

# CONFIG_USB_NET_SMSC95XX is not set

# CONFIG_USB_NET_GL620A is not set

CONFIG_USB_NET_NET1080=m

# CONFIG_USB_NET_PLUSB is not set

# CONFIG_USB_NET_MCS7830 is not set

# CONFIG_USB_NET_RNDIS_HOST is not set

CONFIG_USB_NET_CDC_SUBSET=m

# CONFIG_USB_ALI_M5632 is not set

# CONFIG_USB_AN2720 is not set

CONFIG_USB_BELKIN=y

CONFIG_USB_ARMLINUX=y

# CONFIG_USB_EPSON2888 is not set

# CONFIG_USB_KC2190 is not set

CONFIG_USB_NET_ZAURUS=m

# CONFIG_USB_NET_CX82310_ETH is not set

# CONFIG_USB_NET_KALMIA is not set

# CONFIG_USB_HSO is not set

# CONFIG_USB_NET_INT51X1 is not set

# CONFIG_USB_IPHETH is not set

# CONFIG_USB_SIERRA_NET is not set

# CONFIG_USB_VL600 is not set

# CONFIG_WAN is not set

CONFIG_IEEE802154_DRIVERS=m

CONFIG_IEEE802154_FAKEHARD=m

#

# CAIF transport drivers

#

# CONFIG_RIONET is not set

# CONFIG_FDDI is not set

# CONFIG_HIPPI is not set

CONFIG_PPP=m

# CONFIG_PPP_MULTILINK is not set

# CONFIG_PPP_FILTER is not set

# CONFIG_PPP_ASYNC is not set

# CONFIG_PPP_SYNC_TTY is not set

# CONFIG_PPP_DEFLATE is not set

# CONFIG_PPP_BSDCOMP is not set

# CONFIG_PPP_MPPE is not set

CONFIG_PPPOE=m

# CONFIG_SLIP is not set

CONFIG_SLHC=m

# CONFIG_NET_FC is not set

CONFIG_NETCONSOLE=y

CONFIG_NETPOLL=y

# CONFIG_NETPOLL_TRAP is not set

CONFIG_NET_POLL_CONTROLLER=y

# CONFIG_VMXNET3 is not set

# CONFIG_ISDN is not set

# CONFIG_PHONE is not set

#

# Input device support

#

CONFIG_INPUT=y

CONFIG_INPUT_FF_MEMLESS=m

CONFIG_INPUT_POLLDEV=m

CONFIG_INPUT_SPARSEKMAP=m

#

# Userland interfaces

#

CONFIG_INPUT_MOUSEDEV=m

# CONFIG_INPUT_MOUSEDEV_PSAUX is not set

CONFIG_INPUT_MOUSEDEV_SCREEN_X=1440

CONFIG_INPUT_MOUSEDEV_SCREEN_Y=900

CONFIG_INPUT_JOYDEV=m

CONFIG_INPUT_EVDEV=m

# CONFIG_INPUT_EVBUG is not set

#

# Input Device Drivers

#

CONFIG_INPUT_KEYBOARD=y

# CONFIG_KEYBOARD_ADP5588 is not set

# CONFIG_KEYBOARD_ADP5589 is not set

CONFIG_KEYBOARD_ATKBD=m

# CONFIG_KEYBOARD_QT1070 is not set

# CONFIG_KEYBOARD_QT2160 is not set

# CONFIG_KEYBOARD_LKKBD is not set

# CONFIG_KEYBOARD_GPIO is not set

# CONFIG_KEYBOARD_GPIO_POLLED is not set

# CONFIG_KEYBOARD_TCA6416 is not set

# CONFIG_KEYBOARD_MATRIX is not set

# CONFIG_KEYBOARD_LM8323 is not set

# CONFIG_KEYBOARD_MAX7359 is not set

# CONFIG_KEYBOARD_MCS is not set

# CONFIG_KEYBOARD_MPR121 is not set

# CONFIG_KEYBOARD_NEWTON is not set

# CONFIG_KEYBOARD_OPENCORES is not set

# CONFIG_KEYBOARD_STOWAWAY is not set

# CONFIG_KEYBOARD_SUNKBD is not set

# CONFIG_KEYBOARD_XTKBD is not set

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=m

CONFIG_MOUSE_PS2_ALPS=y

CONFIG_MOUSE_PS2_LOGIPS2PP=y

CONFIG_MOUSE_PS2_SYNAPTICS=y

CONFIG_MOUSE_PS2_LIFEBOOK=y

CONFIG_MOUSE_PS2_TRACKPOINT=y

# CONFIG_MOUSE_PS2_ELANTECH is not set

# CONFIG_MOUSE_PS2_SENTELIC is not set

# CONFIG_MOUSE_PS2_TOUCHKIT is not set

CONFIG_MOUSE_SERIAL=m

CONFIG_MOUSE_APPLETOUCH=m

CONFIG_MOUSE_BCM5974=m

# CONFIG_MOUSE_VSXXXAA is not set

# CONFIG_MOUSE_GPIO is not set

CONFIG_MOUSE_SYNAPTICS_I2C=m

CONFIG_INPUT_JOYSTICK=y

CONFIG_JOYSTICK_ANALOG=m

# CONFIG_JOYSTICK_A3D is not set

# CONFIG_JOYSTICK_ADI is not set

# CONFIG_JOYSTICK_COBRA is not set

# CONFIG_JOYSTICK_GF2K is not set

# CONFIG_JOYSTICK_GRIP is not set

# CONFIG_JOYSTICK_GRIP_MP is not set

# CONFIG_JOYSTICK_GUILLEMOT is not set

# CONFIG_JOYSTICK_INTERACT is not set

# CONFIG_JOYSTICK_SIDEWINDER is not set

# CONFIG_JOYSTICK_TMDC is not set

# CONFIG_JOYSTICK_IFORCE is not set

# CONFIG_JOYSTICK_WARRIOR is not set

# CONFIG_JOYSTICK_MAGELLAN is not set

# CONFIG_JOYSTICK_SPACEORB is not set

# CONFIG_JOYSTICK_SPACEBALL is not set

# CONFIG_JOYSTICK_STINGER is not set

# CONFIG_JOYSTICK_TWIDJOY is not set

# CONFIG_JOYSTICK_ZHENHUA is not set

# CONFIG_JOYSTICK_AS5011 is not set

# CONFIG_JOYSTICK_JOYDUMP is not set

# CONFIG_JOYSTICK_XPAD is not set

CONFIG_INPUT_TABLET=y

# CONFIG_TABLET_USB_ACECAD is not set

# CONFIG_TABLET_USB_AIPTEK is not set

# CONFIG_TABLET_USB_GTCO is not set

# CONFIG_TABLET_USB_HANWANG is not set

# CONFIG_TABLET_USB_KBTAB is not set

CONFIG_TABLET_USB_WACOM=m

CONFIG_INPUT_TOUCHSCREEN=y

# CONFIG_TOUCHSCREEN_AD7879 is not set

# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set

# CONFIG_TOUCHSCREEN_BU21013 is not set

# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set

# CONFIG_TOUCHSCREEN_DYNAPRO is not set

# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set

# CONFIG_TOUCHSCREEN_EETI is not set

# CONFIG_TOUCHSCREEN_FUJITSU is not set

# CONFIG_TOUCHSCREEN_GUNZE is not set

# CONFIG_TOUCHSCREEN_ELO is not set

# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set

# CONFIG_TOUCHSCREEN_MAX11801 is not set

# CONFIG_TOUCHSCREEN_MCS5000 is not set

# CONFIG_TOUCHSCREEN_MTOUCH is not set

# CONFIG_TOUCHSCREEN_INEXIO is not set

# CONFIG_TOUCHSCREEN_MK712 is not set

# CONFIG_TOUCHSCREEN_PENMOUNT is not set

# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set

# CONFIG_TOUCHSCREEN_TOUCHWIN is not set

CONFIG_TOUCHSCREEN_WM97XX=m

CONFIG_TOUCHSCREEN_WM9705=y

CONFIG_TOUCHSCREEN_WM9712=y

CONFIG_TOUCHSCREEN_WM9713=y

# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set

# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set

# CONFIG_TOUCHSCREEN_TSC2007 is not set

# CONFIG_TOUCHSCREEN_ST1232 is not set

# CONFIG_TOUCHSCREEN_TPS6507X is not set

CONFIG_INPUT_MISC=y

# CONFIG_INPUT_AD714X is not set

CONFIG_INPUT_PCSPKR=m

# CONFIG_INPUT_MMA8450 is not set

# CONFIG_INPUT_MPU3050 is not set

# CONFIG_INPUT_APANEL is not set

# CONFIG_INPUT_ATLAS_BTNS is not set

# CONFIG_INPUT_ATI_REMOTE is not set

# CONFIG_INPUT_ATI_REMOTE2 is not set

# CONFIG_INPUT_KEYSPAN_REMOTE is not set

# CONFIG_INPUT_KXTJ9 is not set

# CONFIG_INPUT_POWERMATE is not set

# CONFIG_INPUT_YEALINK is not set

# CONFIG_INPUT_CM109 is not set

CONFIG_INPUT_UINPUT=m

# CONFIG_INPUT_PCF8574 is not set

# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set

# CONFIG_INPUT_ADXL34X is not set

# CONFIG_INPUT_CMA3000 is not set

#

# Hardware I/O ports

#

CONFIG_SERIO=m

CONFIG_SERIO_I8042=m

CONFIG_SERIO_SERPORT=m

# CONFIG_SERIO_CT82C710 is not set

# CONFIG_SERIO_PCIPS2 is not set

CONFIG_SERIO_LIBPS2=m

# CONFIG_SERIO_RAW is not set

# CONFIG_SERIO_ALTERA_PS2 is not set

# CONFIG_SERIO_PS2MULT is not set

CONFIG_GAMEPORT=m

# CONFIG_GAMEPORT_NS558 is not set

# CONFIG_GAMEPORT_L4 is not set

# CONFIG_GAMEPORT_EMU10K1 is not set

# CONFIG_GAMEPORT_FM801 is not set

#

# Character devices

#

CONFIG_VT=y

CONFIG_CONSOLE_TRANSLATIONS=y

CONFIG_VT_CONSOLE=y

CONFIG_HW_CONSOLE=y

CONFIG_VT_HW_CONSOLE_BINDING=y

CONFIG_UNIX98_PTYS=y

# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

# CONFIG_LEGACY_PTYS is not set

CONFIG_SERIAL_NONSTANDARD=y

# CONFIG_ROCKETPORT is not set

# CONFIG_CYCLADES is not set

# CONFIG_MOXA_INTELLIO is not set

# CONFIG_MOXA_SMARTIO is not set

# CONFIG_SYNCLINK is not set

# CONFIG_SYNCLINKMP is not set

# CONFIG_SYNCLINK_GT is not set

# CONFIG_NOZOMI is not set

# CONFIG_ISI is not set

# CONFIG_N_HDLC is not set

# CONFIG_N_GSM is not set

# CONFIG_TRACE_SINK is not set

CONFIG_DEVKMEM=y

# CONFIG_STALDRV is not set

#

# Serial drivers

#

CONFIG_SERIAL_8250=m

CONFIG_FIX_EARLYCON_MEM=y

CONFIG_SERIAL_8250_PCI=m

CONFIG_SERIAL_8250_PNP=m

CONFIG_SERIAL_8250_NR_UARTS=32

CONFIG_SERIAL_8250_RUNTIME_UARTS=4

CONFIG_SERIAL_8250_EXTENDED=y

CONFIG_SERIAL_8250_MANY_PORTS=y

CONFIG_SERIAL_8250_SHARE_IRQ=y

CONFIG_SERIAL_8250_DETECT_IRQ=y

CONFIG_SERIAL_8250_RSA=y

#

# Non-8250 serial port support

#

# CONFIG_SERIAL_MFD_HSU is not set

CONFIG_SERIAL_CORE=m

# CONFIG_SERIAL_JSM is not set

# CONFIG_SERIAL_TIMBERDALE is not set

# CONFIG_SERIAL_ALTERA_JTAGUART is not set

# CONFIG_SERIAL_ALTERA_UART is not set

# CONFIG_SERIAL_PCH_UART is not set

# CONFIG_SERIAL_XILINX_PS_UART is not set

# CONFIG_TTY_PRINTK is not set

# CONFIG_IPMI_HANDLER is not set

CONFIG_HW_RANDOM=m

CONFIG_HW_RANDOM_TIMERIOMEM=m

CONFIG_HW_RANDOM_INTEL=m

# CONFIG_HW_RANDOM_AMD is not set

CONFIG_HW_RANDOM_VIA=m

CONFIG_NVRAM=m

# CONFIG_R3964 is not set

# CONFIG_APPLICOM is not set

CONFIG_MWAVE=m

CONFIG_RAW_DRIVER=m

CONFIG_MAX_RAW_DEVS=256

CONFIG_HPET=y

# CONFIG_HPET_MMAP is not set

CONFIG_HANGCHECK_TIMER=m

# CONFIG_TCG_TPM is not set

# CONFIG_TELCLOCK is not set

CONFIG_DEVPORT=y

# CONFIG_RAMOOPS is not set

CONFIG_I2C=m

CONFIG_I2C_BOARDINFO=y

CONFIG_I2C_COMPAT=y

CONFIG_I2C_CHARDEV=m

# CONFIG_I2C_MUX is not set

CONFIG_I2C_HELPER_AUTO=y

CONFIG_I2C_ALGOBIT=m

#

# I2C Hardware Bus support

#

#

# PC SMBus host controller drivers

#

# CONFIG_I2C_ALI1535 is not set

# CONFIG_I2C_ALI1563 is not set

# CONFIG_I2C_ALI15X3 is not set

# CONFIG_I2C_AMD756 is not set

# CONFIG_I2C_AMD8111 is not set

CONFIG_I2C_I801=m

CONFIG_I2C_ISCH=m

CONFIG_I2C_PIIX4=m

# CONFIG_I2C_NFORCE2 is not set

# CONFIG_I2C_SIS5595 is not set

# CONFIG_I2C_SIS630 is not set

# CONFIG_I2C_SIS96X is not set

# CONFIG_I2C_VIA is not set

# CONFIG_I2C_VIAPRO is not set

#

# ACPI drivers

#

CONFIG_I2C_SCMI=m

#

# I2C system bus drivers (mostly embedded / system-on-chip)

#

# CONFIG_I2C_GPIO is not set

CONFIG_I2C_INTEL_MID=m

# CONFIG_I2C_OCORES is not set

# CONFIG_I2C_PCA_PLATFORM is not set

# CONFIG_I2C_PXA_PCI is not set

# CONFIG_I2C_SIMTEC is not set

# CONFIG_I2C_XILINX is not set

# CONFIG_I2C_EG20T is not set

#

# External I2C/SMBus adapter drivers

#

# CONFIG_I2C_DIOLAN_U2C is not set

# CONFIG_I2C_PARPORT_LIGHT is not set

# CONFIG_I2C_TAOS_EVM is not set

# CONFIG_I2C_TINY_USB is not set

#

# Other I2C/SMBus bus drivers

#

# CONFIG_I2C_STUB is not set

# CONFIG_I2C_DEBUG_CORE is not set

# CONFIG_I2C_DEBUG_ALGO is not set

# CONFIG_I2C_DEBUG_BUS is not set

# CONFIG_SPI is not set

#

# PPS support

#

# CONFIG_PPS is not set

#

# PPS generators support

#

#

# PTP clock support

#

#

# Enable Device Drivers -> PPS to see the PTP clock options.

#

CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y

CONFIG_GPIOLIB=y

# CONFIG_DEBUG_GPIO is not set

CONFIG_GPIO_SYSFS=y

CONFIG_GPIO_GENERIC=m

#

# Memory mapped GPIO drivers:

#

CONFIG_GPIO_GENERIC_PLATFORM=m

# CONFIG_GPIO_IT8761E is not set

CONFIG_GPIO_SCH=m

# CONFIG_GPIO_VX855 is not set

#

# I2C GPIO expanders:

#

# CONFIG_GPIO_MAX7300 is not set

# CONFIG_GPIO_MAX732X is not set

# CONFIG_GPIO_PCA953X is not set

# CONFIG_GPIO_PCF857X is not set

# CONFIG_GPIO_ADP5588 is not set

#

# PCI GPIO expanders:

#

# CONFIG_GPIO_BT8XX is not set

# CONFIG_GPIO_LANGWELL is not set

CONFIG_GPIO_PCH=m

# CONFIG_GPIO_ML_IOH is not set

# CONFIG_GPIO_RDC321X is not set

#

# SPI GPIO expanders:

#

CONFIG_GPIO_MCP23S08=m

#

# AC97 GPIO expanders:

#

#

# MODULbus GPIO expanders:

#

CONFIG_W1=m

CONFIG_W1_CON=y

#

# 1-wire Bus Masters

#

# CONFIG_W1_MASTER_MATROX is not set

# CONFIG_W1_MASTER_DS2490 is not set

# CONFIG_W1_MASTER_DS2482 is not set

# CONFIG_W1_MASTER_DS1WM is not set

# CONFIG_W1_MASTER_GPIO is not set

#

# 1-wire Slaves

#

# CONFIG_W1_SLAVE_THERM is not set

# CONFIG_W1_SLAVE_SMEM is not set

# CONFIG_W1_SLAVE_DS2408 is not set

# CONFIG_W1_SLAVE_DS2423 is not set

# CONFIG_W1_SLAVE_DS2431 is not set

# CONFIG_W1_SLAVE_DS2433 is not set

# CONFIG_W1_SLAVE_DS2760 is not set

CONFIG_W1_SLAVE_DS2780=m

# CONFIG_W1_SLAVE_BQ27000 is not set

CONFIG_POWER_SUPPLY=m

# CONFIG_POWER_SUPPLY_DEBUG is not set

CONFIG_PDA_POWER=m

CONFIG_TEST_POWER=m

CONFIG_BATTERY_DS2780=m

CONFIG_BATTERY_DS2782=m

CONFIG_BATTERY_BQ20Z75=m

CONFIG_BATTERY_BQ27x00=m

CONFIG_BATTERY_BQ27X00_I2C=y

CONFIG_BATTERY_BQ27X00_PLATFORM=y

CONFIG_BATTERY_MAX17040=m

CONFIG_BATTERY_MAX17042=m

CONFIG_CHARGER_ISP1704=m

CONFIG_CHARGER_MAX8903=m

CONFIG_CHARGER_GPIO=m

CONFIG_HWMON=m

# CONFIG_HWMON_VID is not set

# CONFIG_HWMON_DEBUG_CHIP is not set

#

# Native drivers

#

# CONFIG_SENSORS_ABITUGURU is not set

# CONFIG_SENSORS_ABITUGURU3 is not set

# CONFIG_SENSORS_AD7414 is not set

# CONFIG_SENSORS_AD7418 is not set

# CONFIG_SENSORS_ADM1021 is not set

# CONFIG_SENSORS_ADM1025 is not set

# CONFIG_SENSORS_ADM1026 is not set

# CONFIG_SENSORS_ADM1029 is not set

# CONFIG_SENSORS_ADM1031 is not set

# CONFIG_SENSORS_ADM9240 is not set

# CONFIG_SENSORS_ADT7411 is not set

# CONFIG_SENSORS_ADT7462 is not set

# CONFIG_SENSORS_ADT7470 is not set

# CONFIG_SENSORS_ADT7475 is not set

# CONFIG_SENSORS_ASC7621 is not set

# CONFIG_SENSORS_K8TEMP is not set

# CONFIG_SENSORS_K10TEMP is not set

# CONFIG_SENSORS_FAM15H_POWER is not set

# CONFIG_SENSORS_ASB100 is not set

# CONFIG_SENSORS_ATXP1 is not set

# CONFIG_SENSORS_DS620 is not set

# CONFIG_SENSORS_DS1621 is not set

# CONFIG_SENSORS_I5K_AMB is not set

# CONFIG_SENSORS_F71805F is not set

# CONFIG_SENSORS_F71882FG is not set

# CONFIG_SENSORS_F75375S is not set

# CONFIG_SENSORS_FSCHMD is not set

# CONFIG_SENSORS_G760A is not set

# CONFIG_SENSORS_GL518SM is not set

# CONFIG_SENSORS_GL520SM is not set

# CONFIG_SENSORS_GPIO_FAN is not set

CONFIG_SENSORS_CORETEMP=m

# CONFIG_SENSORS_IT87 is not set

# CONFIG_SENSORS_JC42 is not set

# CONFIG_SENSORS_LINEAGE is not set

# CONFIG_SENSORS_LM63 is not set

# CONFIG_SENSORS_LM73 is not set

# CONFIG_SENSORS_LM75 is not set

# CONFIG_SENSORS_LM77 is not set

# CONFIG_SENSORS_LM78 is not set

# CONFIG_SENSORS_LM80 is not set

# CONFIG_SENSORS_LM83 is not set

# CONFIG_SENSORS_LM85 is not set

# CONFIG_SENSORS_LM87 is not set

# CONFIG_SENSORS_LM90 is not set

# CONFIG_SENSORS_LM92 is not set

# CONFIG_SENSORS_LM93 is not set

# CONFIG_SENSORS_LTC4151 is not set

# CONFIG_SENSORS_LTC4215 is not set

# CONFIG_SENSORS_LTC4245 is not set

# CONFIG_SENSORS_LTC4261 is not set

# CONFIG_SENSORS_LM95241 is not set

# CONFIG_SENSORS_LM95245 is not set

# CONFIG_SENSORS_MAX16065 is not set

# CONFIG_SENSORS_MAX1619 is not set

# CONFIG_SENSORS_MAX1668 is not set

# CONFIG_SENSORS_MAX6639 is not set

# CONFIG_SENSORS_MAX6642 is not set

# CONFIG_SENSORS_MAX6650 is not set

# CONFIG_SENSORS_NTC_THERMISTOR is not set

# CONFIG_SENSORS_PC87360 is not set

# CONFIG_SENSORS_PC87427 is not set

# CONFIG_SENSORS_PCF8591 is not set

CONFIG_PMBUS=m

CONFIG_SENSORS_PMBUS=m

# CONFIG_SENSORS_ADM1275 is not set

# CONFIG_SENSORS_LM25066 is not set

# CONFIG_SENSORS_MAX16064 is not set

# CONFIG_SENSORS_MAX34440 is not set

# CONFIG_SENSORS_MAX8688 is not set

# CONFIG_SENSORS_UCD9000 is not set

# CONFIG_SENSORS_UCD9200 is not set

# CONFIG_SENSORS_SHT15 is not set

# CONFIG_SENSORS_SHT21 is not set

# CONFIG_SENSORS_SIS5595 is not set

# CONFIG_SENSORS_SMM665 is not set

# CONFIG_SENSORS_DME1737 is not set

# CONFIG_SENSORS_EMC1403 is not set

# CONFIG_SENSORS_EMC2103 is not set

# CONFIG_SENSORS_EMC6W201 is not set

# CONFIG_SENSORS_SMSC47M1 is not set

# CONFIG_SENSORS_SMSC47M192 is not set

# CONFIG_SENSORS_SMSC47B397 is not set

# CONFIG_SENSORS_SCH56XX_COMMON is not set

# CONFIG_SENSORS_SCH5627 is not set

# CONFIG_SENSORS_SCH5636 is not set

# CONFIG_SENSORS_ADS1015 is not set

# CONFIG_SENSORS_ADS7828 is not set

# CONFIG_SENSORS_AMC6821 is not set

# CONFIG_SENSORS_THMC50 is not set

# CONFIG_SENSORS_TMP102 is not set

# CONFIG_SENSORS_TMP401 is not set

# CONFIG_SENSORS_TMP421 is not set

# CONFIG_SENSORS_VIA_CPUTEMP is not set

# CONFIG_SENSORS_VIA686A is not set

# CONFIG_SENSORS_VT1211 is not set

# CONFIG_SENSORS_VT8231 is not set

# CONFIG_SENSORS_W83781D is not set

# CONFIG_SENSORS_W83791D is not set

# CONFIG_SENSORS_W83792D is not set

# CONFIG_SENSORS_W83793 is not set

# CONFIG_SENSORS_W83795 is not set

# CONFIG_SENSORS_W83L785TS is not set

# CONFIG_SENSORS_W83L786NG is not set

# CONFIG_SENSORS_W83627HF is not set

# CONFIG_SENSORS_W83627EHF is not set

CONFIG_SENSORS_APPLESMC=m

#

# ACPI drivers

#

CONFIG_SENSORS_ACPI_POWER=m

# CONFIG_SENSORS_ATK0110 is not set

CONFIG_THERMAL=y

CONFIG_WATCHDOG=y

CONFIG_WATCHDOG_CORE=y

# CONFIG_WATCHDOG_NOWAYOUT is not set

#

# Watchdog Device Drivers

#

CONFIG_SOFT_WATCHDOG=m

# CONFIG_ACQUIRE_WDT is not set

# CONFIG_ADVANTECH_WDT is not set

# CONFIG_ALIM1535_WDT is not set

# CONFIG_ALIM7101_WDT is not set

# CONFIG_F71808E_WDT is not set

# CONFIG_SP5100_TCO is not set

# CONFIG_SC520_WDT is not set

# CONFIG_SBC_FITPC2_WATCHDOG is not set

# CONFIG_EUROTECH_WDT is not set

# CONFIG_IB700_WDT is not set

# CONFIG_IBMASR is not set

# CONFIG_WAFER_WDT is not set

# CONFIG_I6300ESB_WDT is not set

CONFIG_ITCO_WDT=m

CONFIG_ITCO_VENDOR_SUPPORT=y

# CONFIG_IT8712F_WDT is not set

# CONFIG_IT87_WDT is not set

# CONFIG_HP_WATCHDOG is not set

# CONFIG_SC1200_WDT is not set

# CONFIG_PC87413_WDT is not set

# CONFIG_NV_TCO is not set

# CONFIG_60XX_WDT is not set

# CONFIG_SBC8360_WDT is not set

# CONFIG_CPU5_WDT is not set

# CONFIG_SMSC_SCH311X_WDT is not set

# CONFIG_SMSC37B787_WDT is not set

# CONFIG_W83627HF_WDT is not set

# CONFIG_W83697HF_WDT is not set

# CONFIG_W83697UG_WDT is not set

# CONFIG_W83877F_WDT is not set

# CONFIG_W83977F_WDT is not set

# CONFIG_MACHZ_WDT is not set

# CONFIG_SBC_EPX_C3_WATCHDOG is not set

#

# PCI-based Watchdog Cards

#

# CONFIG_PCIPCWATCHDOG is not set

# CONFIG_WDTPCI is not set

#

# USB-based Watchdog Cards

#

# CONFIG_USBPCWATCHDOG is not set

CONFIG_SSB_POSSIBLE=y

#

# Sonics Silicon Backplane

#

CONFIG_SSB=m

CONFIG_SSB_SPROM=y

CONFIG_SSB_BLOCKIO=y

CONFIG_SSB_PCIHOST_POSSIBLE=y

CONFIG_SSB_PCIHOST=y

CONFIG_SSB_B43_PCI_BRIDGE=y

CONFIG_SSB_SDIOHOST_POSSIBLE=y

CONFIG_SSB_SDIOHOST=y

# CONFIG_SSB_SILENT is not set

# CONFIG_SSB_DEBUG is not set

CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y

CONFIG_SSB_DRIVER_PCICORE=y

CONFIG_BCMA_POSSIBLE=y

#

# Broadcom specific AMBA

#

CONFIG_BCMA=m

CONFIG_BCMA_BLOCKIO=y

CONFIG_BCMA_HOST_PCI_POSSIBLE=y

CONFIG_BCMA_HOST_PCI=y

# CONFIG_BCMA_DEBUG is not set

CONFIG_MFD_SUPPORT=y

CONFIG_MFD_CORE=m

# CONFIG_MFD_SM501 is not set

# CONFIG_HTC_PASIC3 is not set

# CONFIG_UCB1400_CORE is not set

# CONFIG_TPS6105X is not set

# CONFIG_TPS65010 is not set

# CONFIG_TPS6507X is not set

# CONFIG_MFD_TMIO is not set

# CONFIG_MFD_WM8400 is not set

# CONFIG_MFD_PCF50633 is not set

# CONFIG_ABX500_CORE is not set

# CONFIG_MFD_CS5535 is not set

# CONFIG_MFD_TIMBERDALE is not set

CONFIG_LPC_SCH=m

# CONFIG_MFD_RDC321X is not set

# CONFIG_MFD_JANZ_CMODIO is not set

# CONFIG_MFD_VX855 is not set

# CONFIG_MFD_WL1273_CORE is not set

# CONFIG_REGULATOR is not set

CONFIG_MEDIA_SUPPORT=m

#

# Multimedia core support

#

# CONFIG_MEDIA_CONTROLLER is not set

CONFIG_VIDEO_DEV=m

CONFIG_VIDEO_V4L2_COMMON=m

# CONFIG_DVB_CORE is not set

CONFIG_VIDEO_MEDIA=m

#

# Multimedia drivers

#

# CONFIG_RC_CORE is not set

CONFIG_MEDIA_ATTACH=y

CONFIG_MEDIA_TUNER=m

# CONFIG_MEDIA_TUNER_CUSTOMISE is not set

CONFIG_MEDIA_TUNER_SIMPLE=m

CONFIG_MEDIA_TUNER_TDA8290=m

CONFIG_MEDIA_TUNER_TDA827X=m

CONFIG_MEDIA_TUNER_TDA18271=m

CONFIG_MEDIA_TUNER_TDA9887=m

CONFIG_MEDIA_TUNER_TEA5761=m

CONFIG_MEDIA_TUNER_TEA5767=m

CONFIG_MEDIA_TUNER_MT20XX=m

CONFIG_MEDIA_TUNER_XC2028=m

CONFIG_MEDIA_TUNER_XC5000=m

CONFIG_MEDIA_TUNER_XC4000=m

CONFIG_MEDIA_TUNER_MC44S803=m

CONFIG_VIDEO_V4L2=m

CONFIG_VIDEOBUF_GEN=m

CONFIG_VIDEOBUF_VMALLOC=m

CONFIG_VIDEO_TVEEPROM=m

CONFIG_VIDEO_TUNER=m

CONFIG_VIDEOBUF2_CORE=m

CONFIG_VIDEOBUF2_MEMOPS=m

CONFIG_VIDEOBUF2_VMALLOC=m

CONFIG_VIDEO_CAPTURE_DRIVERS=y

# CONFIG_VIDEO_ADV_DEBUG is not set

# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set

CONFIG_VIDEO_HELPER_CHIPS_AUTO=y

#

# Audio decoders, processors and mixers

#

CONFIG_VIDEO_MSP3400=m

CONFIG_VIDEO_CS53L32A=m

CONFIG_VIDEO_WM8775=m

#

# RDS decoders

#

#

# Video decoders

#

CONFIG_VIDEO_SAA711X=m

CONFIG_VIDEO_TVP5150=m

#

# Video and audio decoders

#

CONFIG_VIDEO_CX25840=m

#

# MPEG video encoders

#

CONFIG_VIDEO_CX2341X=m

#

# Video encoders

#

#

# Camera sensor devices

#

CONFIG_VIDEO_MT9V011=m

#

# Flash devices

#

#

# Video improvement chips

#

#

# Miscelaneous helper chips

#

# CONFIG_VIDEO_VIVI is not set

# CONFIG_VIDEO_CPIA2 is not set

# CONFIG_VIDEO_ZORAN is not set

# CONFIG_VIDEO_SAA7134 is not set

# CONFIG_VIDEO_MXB is not set

# CONFIG_VIDEO_HEXIUM_ORION is not set

# CONFIG_VIDEO_HEXIUM_GEMINI is not set

# CONFIG_VIDEO_TIMBERDALE is not set

# CONFIG_VIDEO_CAFE_CCIC is not set

# CONFIG_VIDEO_SR030PC30 is not set

# CONFIG_VIDEO_NOON010PC30 is not set

# CONFIG_SOC_CAMERA is not set

CONFIG_V4L_USB_DRIVERS=y

CONFIG_USB_VIDEO_CLASS=m

CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

CONFIG_USB_GSPCA=m

CONFIG_USB_M5602=m

CONFIG_USB_STV06XX=m

CONFIG_USB_GL860=m

CONFIG_USB_GSPCA_BENQ=m

CONFIG_USB_GSPCA_CONEX=m

CONFIG_USB_GSPCA_CPIA1=m

CONFIG_USB_GSPCA_ETOMS=m

CONFIG_USB_GSPCA_FINEPIX=m

CONFIG_USB_GSPCA_JEILINJ=m

CONFIG_USB_GSPCA_KINECT=m

CONFIG_USB_GSPCA_KONICA=m

CONFIG_USB_GSPCA_MARS=m

CONFIG_USB_GSPCA_MR97310A=m

CONFIG_USB_GSPCA_NW80X=m

CONFIG_USB_GSPCA_OV519=m

CONFIG_USB_GSPCA_OV534=m

CONFIG_USB_GSPCA_OV534_9=m

CONFIG_USB_GSPCA_PAC207=m

CONFIG_USB_GSPCA_PAC7302=m

CONFIG_USB_GSPCA_PAC7311=m

CONFIG_USB_GSPCA_SE401=m

CONFIG_USB_GSPCA_SN9C2028=m

CONFIG_USB_GSPCA_SN9C20X=m

CONFIG_USB_GSPCA_SONIXB=m

CONFIG_USB_GSPCA_SONIXJ=m

CONFIG_USB_GSPCA_SPCA500=m

CONFIG_USB_GSPCA_SPCA501=m

CONFIG_USB_GSPCA_SPCA505=m

CONFIG_USB_GSPCA_SPCA506=m

CONFIG_USB_GSPCA_SPCA508=m

CONFIG_USB_GSPCA_SPCA561=m

CONFIG_USB_GSPCA_SPCA1528=m

CONFIG_USB_GSPCA_SQ905=m

CONFIG_USB_GSPCA_SQ905C=m

CONFIG_USB_GSPCA_SQ930X=m

CONFIG_USB_GSPCA_STK014=m

CONFIG_USB_GSPCA_STV0680=m

CONFIG_USB_GSPCA_SUNPLUS=m

CONFIG_USB_GSPCA_T613=m

CONFIG_USB_GSPCA_TV8532=m

CONFIG_USB_GSPCA_VC032X=m

CONFIG_USB_GSPCA_VICAM=m

CONFIG_USB_GSPCA_XIRLINK_CIT=m

CONFIG_USB_GSPCA_ZC3XX=m

CONFIG_VIDEO_PVRUSB2=m

CONFIG_VIDEO_PVRUSB2_SYSFS=y

# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set

CONFIG_VIDEO_HDPVR=m

CONFIG_VIDEO_EM28XX=m

CONFIG_VIDEO_EM28XX_ALSA=m

CONFIG_VIDEO_USBVISION=m

CONFIG_USB_ET61X251=m

CONFIG_USB_SN9C102=m

CONFIG_USB_PWC=m

# CONFIG_USB_PWC_DEBUG is not set

CONFIG_USB_PWC_INPUT_EVDEV=y

CONFIG_USB_ZR364XX=m

CONFIG_USB_STKWEBCAM=m

CONFIG_USB_S2255=m

CONFIG_V4L_MEM2MEM_DRIVERS=y

# CONFIG_VIDEO_MEM2MEM_TESTDEV is not set

# CONFIG_RADIO_ADAPTERS is not set

#

# Graphics support

#

CONFIG_AGP=m

CONFIG_AGP_INTEL=m

# CONFIG_AGP_SIS is not set

# CONFIG_AGP_VIA is not set

CONFIG_VGA_ARB=y

CONFIG_VGA_ARB_MAX_GPUS=16

CONFIG_VGA_SWITCHEROO=y

CONFIG_DRM=m

CONFIG_DRM_KMS_HELPER=m

CONFIG_DRM_TTM=m

# CONFIG_DRM_TDFX is not set

# CONFIG_DRM_R128 is not set

CONFIG_DRM_RADEON=m

CONFIG_DRM_RADEON_KMS=y

# CONFIG_DRM_I810 is not set

CONFIG_DRM_I915=m

CONFIG_DRM_I915_KMS=y

# CONFIG_DRM_MGA is not set

# CONFIG_DRM_SIS is not set

# CONFIG_DRM_VIA is not set

# CONFIG_DRM_SAVAGE is not set

# CONFIG_STUB_POULSBO is not set

CONFIG_VGASTATE=m

CONFIG_VIDEO_OUTPUT_CONTROL=m

CONFIG_FB=y

CONFIG_FIRMWARE_EDID=y

# CONFIG_FB_DDC is not set

CONFIG_FB_BOOT_VESA_SUPPORT=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set

# CONFIG_FB_SYS_FILLRECT is not set

# CONFIG_FB_SYS_COPYAREA is not set

# CONFIG_FB_SYS_IMAGEBLIT is not set

# CONFIG_FB_FOREIGN_ENDIAN is not set

# CONFIG_FB_SYS_FOPS is not set

# CONFIG_FB_WMT_GE_ROPS is not set

# CONFIG_FB_SVGALIB is not set

# CONFIG_FB_MACMODES is not set

# CONFIG_FB_BACKLIGHT is not set

CONFIG_FB_MODE_HELPERS=y

CONFIG_FB_TILEBLITTING=y

#

# Frame buffer hardware drivers

#

# CONFIG_FB_CIRRUS is not set

# CONFIG_FB_PM2 is not set

# CONFIG_FB_CYBER2000 is not set

# CONFIG_FB_ARC is not set

# CONFIG_FB_ASILIANT is not set

# CONFIG_FB_IMSTT is not set

CONFIG_FB_VGA16=m

CONFIG_FB_UVESA=m

CONFIG_FB_VESA=y

CONFIG_FB_EFI=y

# CONFIG_FB_N411 is not set

# CONFIG_FB_HGA is not set

# CONFIG_FB_S1D13XXX is not set

# CONFIG_FB_NVIDIA is not set

# CONFIG_FB_RIVA is not set

# CONFIG_FB_LE80578 is not set

# CONFIG_FB_INTEL is not set

# CONFIG_FB_MATROX is not set

# CONFIG_FB_RADEON is not set

# CONFIG_FB_ATY128 is not set

# CONFIG_FB_ATY is not set

# CONFIG_FB_S3 is not set

# CONFIG_FB_SAVAGE is not set

# CONFIG_FB_SIS is not set

# CONFIG_FB_VIA is not set

# CONFIG_FB_NEOMAGIC is not set

# CONFIG_FB_KYRO is not set

# CONFIG_FB_3DFX is not set

# CONFIG_FB_VOODOO1 is not set

# CONFIG_FB_VT8623 is not set

# CONFIG_FB_TRIDENT is not set

# CONFIG_FB_ARK is not set

# CONFIG_FB_PM3 is not set

# CONFIG_FB_CARMINE is not set

# CONFIG_FB_GEODE is not set

# CONFIG_FB_TMIO is not set

# CONFIG_FB_UDL is not set

# CONFIG_FB_VIRTUAL is not set

# CONFIG_FB_METRONOME is not set

# CONFIG_FB_MB862XX is not set

# CONFIG_FB_BROADSHEET is not set

CONFIG_BACKLIGHT_LCD_SUPPORT=y

CONFIG_LCD_CLASS_DEVICE=m

CONFIG_LCD_PLATFORM=m

CONFIG_BACKLIGHT_CLASS_DEVICE=m

CONFIG_BACKLIGHT_GENERIC=m

CONFIG_BACKLIGHT_PROGEAR=m

CONFIG_BACKLIGHT_APPLE=m

CONFIG_BACKLIGHT_SAHARA=m

CONFIG_BACKLIGHT_ADP8860=m

CONFIG_BACKLIGHT_ADP8870=m

#

# Display device support

#

CONFIG_DISPLAY_SUPPORT=m

#

# Display hardware drivers

#

#

# Console display driver support

#

CONFIG_VGA_CONSOLE=y

CONFIG_VGACON_SOFT_SCROLLBACK=y

CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64

CONFIG_DUMMY_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y

CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y

CONFIG_FONTS=y

# CONFIG_FONT_8x8 is not set

CONFIG_FONT_8x16=y

# CONFIG_FONT_6x11 is not set

CONFIG_FONT_7x14=y

# CONFIG_FONT_PEARL_8x8 is not set

# CONFIG_FONT_ACORN_8x8 is

----------

## alvinwu

Hi,

Suspend while using b43 wireless connection fails. ERROR MSG:

b43-phy1 ERROR: Microcode not responding

rmmod b43 before suspend, then modprobe b43 after resume still not work, with the above error msg.

Also, log msg indicates " ....download firmware from wireless.kernel.org..." did not find the web-site. Maybe it should be "http://linuxwireless.org/en/users/Drivers/b43" ??

Suspend works while using wired network connection.

Patch files as below: (apply to linux-3.1-rc6 : cat XXX | patch -p0 )

---> apple_bl.c.patch

```

--- drivers/video/backlight/apple_bl.c.orig   2011-09-17 19:00:29.367365204 +0800

+++ drivers/video/backlight/apple_bl.c   2011-09-17 20:48:05.487867440 +0800

@@ -31,6 +31,8 @@

    /* I/O resource to allocate. */

    unsigned long iostart;

    unsigned long iolen;

+   unsigned long io_1_start;

+   unsigned long io_1_len;

    /* Backlight operations structure. */

    const struct backlight_ops backlight_ops;

    void (*set_brightness)(int);

@@ -44,6 +46,12 @@

 static int debug;

 module_param_named(debug, debug, int, 0644);

 MODULE_PARM_DESC(debug, "Set to one to enable debugging messages.");

+static int use_gmux;

+module_param_named(use_gmux, use_gmux, int, 0644);

+MODULE_PARM_DESC(use_gmux, "Set to one to use gmux backlight method");

+static int max_brightness = 132000;

+module_param_named(max_brightness, max_brightness, int, 0644);

+MODULE_PARM_DESC(max_brightness, "Set to max allowable brightness");

 

 /*

  * Implementation for machines with Intel chipset.

@@ -139,6 +147,53 @@

    .set_brightness = nvidia_chipset_set_brightness,

 };

 

+#define PORT_BACKLIGHT_1 0x774

+#define PORT_BACKLIGHT_2 0x10724

+

+static void gmux_set_brightness(int intensity)

+{

+   outw(0x2f, PORT_BACKLIGHT_2);

+   outl(intensity, PORT_BACKLIGHT_1);

+}

+

+static int gmux_send_intensity(struct backlight_device *bd)

+{

+   int intensity = bd->props.brightness;

+

+   if (debug)

+      printk(KERN_DEBUG DRIVER "setting brightness to %d\n",

+             intensity);

+

+   gmux_set_brightness(intensity);

+   return 0;

+}

+

+static int gmux_get_intensity(struct backlight_device *bd)

+{

+   int intensity;

+   intensity = inl(PORT_BACKLIGHT_1);

+

+   if (debug)

+      printk(KERN_DEBUG DRIVER "read brightness of %d\n",

+             intensity);

+

+   return intensity;

+}

+

+static const struct hw_data gmux_data = {

+   .iostart = PORT_BACKLIGHT_1,

+   .iolen = 4,

+   .io_1_start = PORT_BACKLIGHT_2,

+   .io_1_len = 2,

+   .backlight_ops      = {

+      .options   = BL_CORE_SUSPENDRESUME,

+      .get_brightness   = gmux_get_intensity,

+      .update_status   = gmux_send_intensity

+   },

+   .set_brightness = gmux_set_brightness,

+};

+

+

 static int __devinit apple_bl_add(struct acpi_device *dev)

 {

    struct backlight_properties props;

@@ -152,10 +207,16 @@

       return -ENODEV;

    }

 

-   if (host->vendor == PCI_VENDOR_ID_INTEL)

-      hw_data = &intel_chipset_data;

-   else if (host->vendor == PCI_VENDOR_ID_NVIDIA)

-      hw_data = &nvidia_chipset_data;

+      if(use_gmux == 0) {

+         if (host->vendor == PCI_VENDOR_ID_INTEL)

+            hw_data = &intel_chipset_data;

+         else if (host->vendor == PCI_VENDOR_ID_NVIDIA)

+            hw_data = &nvidia_chipset_data;

+      }

+      else

+            hw_data = &gmux_data;

+   

+      printk(KERN_ERR DRIVER "host->vendor == %x gmux = %d", host->vendor, use_gmux);

 

    pci_dev_put(host);

 

@@ -170,24 +231,35 @@

 

    if (!intensity) {

       hw_data->set_brightness(1);

-      if (!hw_data->backlight_ops.get_brightness(NULL))

+      if (!hw_data->backlight_ops.get_brightness(NULL)) {

+               printk(KERN_ERR DRIVER "cannot set brightness - no device found\n");

          return -ENODEV;

-

+      }

       hw_data->set_brightness(0);

    }

 

    if (!request_region(hw_data->iostart, hw_data->iolen,

-             "Apple backlight"))

-      return -ENXIO;

-

+                  "Apple backlight")) {

+               printk(KERN_ERR DRIVER "cannot request backlight region\n");

+               //      return -ENXIO;

+      }

+      if (hw_data->io_1_start != 0 && !request_region(hw_data->io_1_start, hw_data->io_1_len,

+                  "Apple backlight1")) {

+               printk(KERN_ERR DRIVER "cannot request backlight region 1\n");

+               //      return -ENXIO;

+      }

+   

    memset(&props, 0, sizeof(struct backlight_properties));

    props.type = BACKLIGHT_PLATFORM;

-   props.max_brightness = 15;

-   apple_backlight_device = backlight_device_register("apple_backlight",

-              NULL, NULL, &hw_data->backlight_ops, &props);

+   props.max_brightness = use_gmux ? max_brightness : 15;

+   apple_backlight_device = backlight_device_register("acpi_video0",

+      NULL, NULL, &hw_data->backlight_ops, &props);

 

    if (IS_ERR(apple_backlight_device)) {

       release_region(hw_data->iostart, hw_data->iolen);

+      if(hw_data->io_1_start)

+         release_region(hw_data->io_1_start, hw_data->io_1_len);

+      printk(KERN_ERR DRIVER "cannot register device\n");

       return PTR_ERR(apple_backlight_device);

    }

 

@@ -203,6 +275,10 @@

    backlight_device_unregister(apple_backlight_device);

 

    release_region(hw_data->iostart, hw_data->iolen);

+   if(hw_data->io_1_start)

+   release_region(hw_data->io_1_start, hw_data->io_1_len);

+   if(hw_data->io_1_start)

+      release_region(hw_data->io_1_start, hw_data->io_1_len);

    hw_data = NULL;

    return 0;

 }

```

---> applesmc.c.patch

```

--- drivers/hwmon/applesmc.c.orig   2011-09-17 19:00:22.000000000 +0800

+++ drivers/hwmon/applesmc.c   2011-09-17 21:09:24.462899090 +0800

@@ -1222,8 +1222,7 @@

 static int __init applesmc_init(void)

 {

    int ret;

-

-   if (!dmi_check_system(applesmc_whitelist)) {

+   if (0 && !dmi_check_system(applesmc_whitelist)) {

       pr_warn("supported laptop not found!\n");

       ret = -ENODEV;

       goto out;

```

---> hid-apple.c.patch

```

--- drivers/hid/hid-apple.c.orig   2011-09-17 19:00:22.000000000 +0800

+++ drivers/hid/hid-apple.c   2011-09-17 21:18:15.850912245 +0800

@@ -493,6 +493,12 @@

       .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),

       .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },

+        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI),

+           .driver_data = APPLE_HAS_FN },

+      { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),

+            .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },

+      { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS),

+            .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },

    { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),

       .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },

    { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),

```

---> hid-core.c.patch

```

--- drivers/hid/hid-core.c.orig   2011-09-17 19:00:22.000000000 +0800

+++ drivers/hid/hid-core.c   2011-09-17 21:22:41.457918819 +0800

@@ -1340,6 +1340,9 @@

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS) },

@@ -1892,6 +1895,9 @@

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) },

+   { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },

    { }

```

---> hid-ids.h.patch

```

--- drivers/hid/hid-ids.h.orig   2011-09-17 21:26:49.822924968 +0800

+++ drivers/hid/hid-ids.h   2011-09-17 21:25:41.823923282 +0800

@@ -109,6 +109,9 @@

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI   0x0245

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO   0x0246

 #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS   0x0247

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI    0x0252

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO    0x0253

+#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS    0x0254

 #define USB_DEVICE_ID_APPLE_ALU_REVB_ANSI   0x024f

 #define USB_DEVICE_ID_APPLE_ALU_REVB_ISO   0x0250

 #define USB_DEVICE_ID_APPLE_ALU_REVB_JIS   0x0251

```

---> radeon_bios.c.patch

```

--- drivers/gpu/drm/radeon/radeon_bios.c.orig   2011-09-17 20:07:18.107806867 +0800

+++ drivers/gpu/drm/radeon/radeon_bios.c   2011-09-17 20:24:31.913832454 +0800

@@ -29,6 +29,7 @@

 #include "radeon_reg.h"

 #include "radeon.h"

 #include "atom.h"

+#include <linux/firmware.h>

 

 #include <linux/vga_switcheroo.h>

 #include <linux/slab.h>

@@ -56,6 +57,7 @@

    vram_base = pci_resource_start(rdev->pdev, 0);

    bios = ioremap(vram_base, size);

    if (!bios) {

+      DRM_ERROR("No bios\n");

       return false;

    }

 

@@ -65,6 +67,7 @@

    }

    rdev->bios = kmalloc(size, GFP_KERNEL);

    if (rdev->bios == NULL) {

+      DRM_ERROR("alloc fail\n");

       iounmap(bios);

       return false;

    }

@@ -73,6 +76,41 @@

    return true;

 }

 

+static bool radeon_read_bios_from_firmware(struct radeon_device *rdev)

+{

+   const uint8_t __iomem *bios;

+      resource_size_t size;

+      const struct firmware *fw = NULL;

+

+      request_firmware(&fw, "radeon/vbios.bin", rdev->dev);

+      if (!fw) {

+            DRM_ERROR("No bios\n");

+            return false;

+      }

+      size = fw->size;

+      bios = fw->data;

+

+      if (!bios) {

+            DRM_ERROR("No bios\n");

+            return false;

+      }

+

+      if (size == 0 || bios[0] != 0x55 || bios[1] != 0xaa) {

+            DRM_ERROR("wrong sig\n");

+            release_firmware(fw);

+            return false;

+      }

+      rdev->bios = kmalloc(size, GFP_KERNEL);

+      if (rdev->bios == NULL) {

+            DRM_ERROR("alloc fail\n");

+            release_firmware(fw);

+            return false;

+      }

+      memcpy(rdev->bios, bios, size);

+      release_firmware(fw);

+      return true;

+}

+

 static bool radeon_read_bios(struct radeon_device *rdev)

 {

    uint8_t __iomem *bios;

@@ -489,6 +527,9 @@

       r = radeon_read_bios(rdev);

    if (r == false) {

       r = radeon_read_disabled_bios(rdev);

+            if (r == false) {

+               r = radeon_read_bios_from_firmware(rdev);

+      }   

    }

    if (r == false || rdev->bios == NULL) {

       DRM_ERROR("Unable to locate a BIOS ROM\n");

```

---> b43-4331-3.1-rc6.patch

```

--- drivers/bcma/driver_chipcommon_pmu.c.orig   2011-09-19 15:47:48.059998217 +0800

+++ drivers/bcma/driver_chipcommon_pmu.c   2011-09-19 15:50:39.049002450 +0800

@@ -83,6 +83,24 @@

    }

 }

 

+/* Disable to allow reading SPROM. Don't know the adventages of enabling it. */

+void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable)

+{

+   struct bcma_bus *bus = cc->core->bus;

+   u32 val;

+

+   val = bcma_cc_read32(cc, BCMA_CC_CHIPCTL);

+   if (enable) {

+      val |= BCMA_CHIPCTL_4331_EXTPA_EN;

+      if (bus->chipinfo.pkg == 9 || bus->chipinfo.pkg == 11)

+         val |= BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5;

+   } else {

+      val &= ~BCMA_CHIPCTL_4331_EXTPA_EN;

+      val &= ~BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5;

+   }

+   bcma_cc_write32(cc, BCMA_CC_CHIPCTL, val);

+}

+

 void bcma_pmu_workarounds(struct bcma_drv_cc *cc)

 {

    struct bcma_bus *bus = cc->core->bus;

@@ -92,7 +110,7 @@

       bcma_chipco_chipctl_maskset(cc, 0, ~0, 0x7);

       break;

    case 0x4331:

-      pr_err("Enabling Ext PA lines not implemented\n");

+      /* BCM4331 workaround is SPROM-related, we put it in sprom.c */

       break;

    case 43224:

       if (bus->chipinfo.rev == 0) {

--- drivers/bcma/sprom.c.orig   2011-09-19 15:02:06.000000000 +0800

+++ drivers/bcma/sprom.c   2011-09-19 15:56:34.686011251 +0800

@@ -152,12 +152,17 @@

    if (!sprom)

       return -ENOMEM;

 

+      if (bus->chipinfo.id == 0x4331)

+            bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);

+

    /* Most cards have SPROM moved by additional offset 0x30 (48 dwords).

     * According to brcm80211 this applies to cards with PCIe rev >= 6

     * TODO: understand this condition and use it */

    offset = (bus->chipinfo.id == 0x4331) ? BCMA_CC_SPROM :

       BCMA_CC_SPROM_PCIE6;

    bcma_sprom_read(bus, offset, sprom);

+      if (bus->chipinfo.id == 0x4331)

+            bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);

 

    err = bcma_sprom_valid(sprom);

    if (err)

--- drivers/net/wireless/b43/Kconfig.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/Kconfig   2011-09-19 16:38:06.444072925 +0800

@@ -124,12 +124,12 @@

      (802.11a support is optional, and currently disabled).

 

 config B43_PHY_HT

-   bool "Support for HT-PHY devices (BROKEN)"

-   depends on B43 && BROKEN

+   bool "Support for HT-PHY (high throughput) devices (EXPERIMENTAL)"

+   depends on B43 && EXPERIMENTAL

    ---help---

      Support for the HT-PHY.

 

-     Say N, this is BROKEN and crashes driver.

+     Enables support for BCM4331 and possibly other chipsets with that PHY.

 

 config B43_PHY_LCN

    bool "Support for LCN-PHY devices (BROKEN)"

--- drivers/net/wireless/b43/b43.h.orig   2011-09-19 15:02:07.566930391 +0800

+++ drivers/net/wireless/b43/b43.h   2011-09-19 16:43:18.035080632 +0800

@@ -694,6 +694,12 @@

    enum b43_firmware_file_type type;

 };

 

+enum b43_firmware_hdr_format {

+   B43_FW_HDR_598,

+   B43_FW_HDR_410,

+   B43_FW_HDR_351,

+};

+

 /* Pointers to the firmware data and meta information about it. */

 struct b43_firmware {

    /* Microcode */

@@ -709,6 +715,8 @@

    u16 rev;

    /* Firmware patchlevel */

    u16 patch;

+      /* Format of header used by firmware */

+      enum b43_firmware_hdr_format hdr_format;

 

    /* Set to true, if we are using an opensource firmware.

     * Use this to check for proprietary vs opensource. */

@@ -875,7 +883,7 @@

    struct b43_leds leds;

 

    /* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */

-   u8 pio_scratchspace[110] __attribute__((__aligned__(8)));

+   u8 pio_scratchspace[118] __attribute__((__aligned__(8)));

    u8 pio_tailspace[4] __attribute__((__aligned__(8)));

 };

 

--- drivers/net/wireless/b43/dma.c.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/dma.c   2011-09-19 16:59:35.715104834 +0800

@@ -389,33 +389,32 @@

    gfp_t flags = GFP_KERNEL;

 

    /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K

-    * alignment and 8K buffers for 64-bit DMA with 8K alignment. Testing

-    * has shown that 4K is sufficient for the latter as long as the buffer

-    * does not cross an 8K boundary.

-    *

-    * For unknown reasons - possibly a hardware error - the BCM4311 rev

-    * 02, which uses 64-bit DMA, needs the ring buffer in very low memory,

-    * which accounts for the GFP_DMA flag below.

-    *

-    * The flags here must match the flags in free_ringmemory below!

+    * In practice we could use smaller buffers for the latter, but the

+    * alignment is really important because of the hardware bug. If bit

+    * 0x00001000 is used in DMA address, some hardware (like BCM4331)

+    * copies that bit into B43_DMA64_RXSTATUS and we get false values from

+    * B43_DMA64_RXSTATDPTR. Let's just use 8K buffers even if we don't use

+    * more than 256 slots for ring.

     */

-   if (ring->type == B43_DMA_64BIT)

-      flags |= GFP_DMA;

+   u16 ring_mem_size = (ring->type == B43_DMA_64BIT) ?

+            B43_DMA64_RINGMEMSIZE : B43_DMA32_RINGMEMSIZE;

+   

    ring->descbase = dma_alloc_coherent(ring->dev->dev->dma_dev,

-                   B43_DMA_RINGMEMSIZE,

-                   &(ring->dmabase), flags);

+                    ring_mem_size, &(ring->dmabase),

+                    flags);

    if (!ring->descbase) {

       b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");

       return -ENOMEM;

    }

-   memset(ring->descbase, 0, B43_DMA_RINGMEMSIZE);

-

+         memset(ring->descbase, 0, ring_mem_size);

    return 0;

 }

 

 static void free_ringmemory(struct b43_dmaring *ring)

 {

-   dma_free_coherent(ring->dev->dev->dma_dev, B43_DMA_RINGMEMSIZE,

+         u16 ring_mem_size = (ring->type == B43_DMA_64BIT) ?

+                  B43_DMA64_RINGMEMSIZE : B43_DMA32_RINGMEMSIZE;

+         dma_free_coherent(ring->dev->dev->dma_dev, ring_mem_size,

            ring->descbase, ring->dmabase);

 }

 

@@ -872,8 +871,18 @@

       ring->current_slot = -1;

    } else {

       if (ring->index == 0) {

-         ring->rx_buffersize = B43_DMA0_RX_BUFFERSIZE;

-         ring->frameoffset = B43_DMA0_RX_FRAMEOFFSET;

+               switch (dev->fw.hdr_format) {

+               case B43_FW_HDR_598:

+                  ring->rx_buffersize = B43_DMA0_RX_FW598_BUFSIZE;

+                  ring->frameoffset = B43_DMA0_RX_FW598_FO;

+                  break;

+               case B43_FW_HDR_410:

+               case B43_FW_HDR_351:

+                  ring->rx_buffersize = B43_DMA0_RX_FW351_BUFSIZE;

+                  ring->frameoffset = B43_DMA0_RX_FW351_FO;

+                  break;

+         }

+

       } else

          B43_WARN_ON(1);

    }

--- drivers/net/wireless/b43/dma.h.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/dma.h   2011-09-19 17:04:08.936111594 +0800

@@ -161,13 +161,17 @@

 } __packed;

 

 /* Misc DMA constants */

-#define B43_DMA_RINGMEMSIZE      PAGE_SIZE

-#define B43_DMA0_RX_FRAMEOFFSET      30

+#define B43_DMA32_RINGMEMSIZE      4096

+#define B43_DMA64_RINGMEMSIZE      8192

+/* Offset of frame with actual data */

+#define B43_DMA0_RX_FW598_FO      38

+#define B43_DMA0_RX_FW351_FO      30

 

 /* DMA engine tuning knobs */

 #define B43_TXRING_SLOTS      256

 #define B43_RXRING_SLOTS      64

-#define B43_DMA0_RX_BUFFERSIZE      (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN)

+#define B43_DMA0_RX_FW598_BUFSIZE   (B43_DMA0_RX_FW598_FO + IEEE80211_MAX_FRAME_LEN)

+#define B43_DMA0_RX_FW351_BUFSIZE   (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)

 

 /* Pointer poison */

 #define B43_DMA_PTR_POISON      ((void *)ERR_PTR(-ENOMEM))

--- drivers/net/wireless/b43/main.c.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/main.c   2011-09-19 17:11:25.415122396 +0800

@@ -2510,6 +2510,12 @@

    }

    dev->fw.rev = fwrev;

    dev->fw.patch = fwpatch;

+   if (dev->fw.rev >= 598)

+      dev->fw.hdr_format = B43_FW_HDR_598;

+   else if (dev->fw.rev >= 410)

+      dev->fw.hdr_format = B43_FW_HDR_410;

+   else

+      dev->fw.hdr_format = B43_FW_HDR_351;

    dev->fw.opensource = (fwdate == 0xFFFF);

 

    /* Default to use-all-queues. */

@@ -2557,7 +2563,7 @@

          dev->fw.rev, dev->fw.patch);

    wiphy->hw_version = dev->dev->core_id;

 

-   if (b43_is_old_txhdr_format(dev)) {

+      if (dev->fw.hdr_format == B43_FW_HDR_351) {

       /* We're over the deadline, but we keep support for old fw

        * until it turns out to be in major conflict with something new. */

       b43warn(dev->wl, "You are using an old firmware image. "

@@ -2943,6 +2949,7 @@

    case B43_PHYTYPE_G:

    case B43_PHYTYPE_N:

    case B43_PHYTYPE_LP:

+   case B43_PHYTYPE_HT:

       b43_rate_memory_write(dev, B43_OFDM_RATE_6MB, 1);

       b43_rate_memory_write(dev, B43_OFDM_RATE_12MB, 1);

       b43_rate_memory_write(dev, B43_OFDM_RATE_18MB, 1);

--- drivers/net/wireless/b43/phy_common.h.orig   2011-09-19 15:02:07.569930391 +0800

+++ drivers/net/wireless/b43/phy_common.h   2011-09-19 17:12:52.777124558 +0800

@@ -444,6 +444,8 @@

 

 bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type);

 

+void b43_phy_force_clock(struct b43_wldev *dev, bool force);

+

 struct b43_c32 b43_cordic(int theta);

 

 #endif /* LINUX_B43_PHY_COMMON_H_ */

--- drivers/net/wireless/b43/phy_ht.c.orig   2011-09-19 15:02:07.570930391 +0800

+++ drivers/net/wireless/b43/phy_ht.c   2011-09-19 17:23:45.336140712 +0800

@@ -152,6 +152,92 @@

 }

 

 /**************************************************

+ * Various PHY ops

+ **************************************************/

+

+static void b43_phy_ht_zero_extg(struct b43_wldev *dev)

+{

+   u8 i, j;

+   u16 base[] = { 0x40, 0x60, 0x80 };

+

+   for (i = 0; i < ARRAY_SIZE(base); i++) {

+      for (j = 0; j < 4; j++)

+         b43_phy_write(dev, B43_PHY_EXTG(base[i] + j), 0);

+   }

+

+   for (i = 0; i < ARRAY_SIZE(base); i++)

+      b43_phy_write(dev, B43_PHY_EXTG(base[i] + 0xc), 0);

+}

+

+/* Some unknown AFE (Analog Frondned) op */

+static void b43_phy_ht_afe_unk1(struct b43_wldev *dev)

+{

+   u8 i;

+

+   const u16 ctl_regs[3][2] = {

+      { B43_PHY_HT_AFE_CTL1, B43_PHY_HT_AFE_CTL2 },

+      { B43_PHY_HT_AFE_CTL3, B43_PHY_HT_AFE_CTL4 },

+      { B43_PHY_HT_AFE_CTL5, B43_PHY_HT_AFE_CTL6},

+   };

+

+   for (i = 0; i < 3; i++) {

+      /* TODO: verify masks&sets */

+      b43_phy_set(dev, ctl_regs[i][1], 0x4);

+      b43_phy_set(dev, ctl_regs[i][0], 0x4);

+      b43_phy_mask(dev, ctl_regs[i][1], ~0x1);

+      b43_phy_set(dev, ctl_regs[i][0], 0x1);

+      b43_httab_write(dev, B43_HTTAB16(8, 5 + (i * 0x10)), 0);

+      b43_phy_mask(dev, ctl_regs[i][0], ~0x4);

+   }

+}

+

+static void b43_phy_ht_force_rf_sequence(struct b43_wldev *dev, u16 rf_seq)

+{

+   u8 i;

+

+   u16 save_seq_mode = b43_phy_read(dev, B43_PHY_HT_RF_SEQ_MODE);

+   b43_phy_set(dev, B43_PHY_HT_RF_SEQ_MODE, 0x3);

+

+   b43_phy_set(dev, B43_PHY_HT_RF_SEQ_TRIG, rf_seq);

+   for (i = 0; i < 200; i++) {

+      if (!(b43_phy_read(dev, B43_PHY_HT_RF_SEQ_STATUS) & rf_seq)) {

+         i = 0;

+         break;

+      }

+      msleep(1);

+   }

+   if (i)

+      b43err(dev->wl, "Forcing RF sequence timeout\n");

+

+   b43_phy_write(dev, B43_PHY_HT_RF_SEQ_MODE, save_seq_mode);

+}

+

+static void b43_phy_ht_read_clip_detection(struct b43_wldev *dev, u16 *clip_st)

+{

+   clip_st[0] = b43_phy_read(dev, B43_PHY_HT_C1_CLIP1THRES);

+   clip_st[1] = b43_phy_read(dev, B43_PHY_HT_C2_CLIP1THRES);

+   clip_st[2] = b43_phy_read(dev, B43_PHY_HT_C3_CLIP1THRES);

+}

+

+static void b43_phy_ht_bphy_init(struct b43_wldev *dev)

+{

+   unsigned int i;

+   u16 val;

+

+   val = 0x1E1F;

+   for (i = 0; i < 16; i++) {

+      b43_phy_write(dev, B43_PHY_N_BMODE(0x88 + i), val);

+      val -= 0x202;

+   }

+   val = 0x3E3F;

+   for (i = 0; i < 16; i++) {

+      b43_phy_write(dev, B43_PHY_N_BMODE(0x98 + i), val);

+      val -= 0x202;

+   }

+   b43_phy_write(dev, B43_PHY_N_BMODE(0x38), 0x668);

+}

+

+/**************************************************

  * Channel switching ops.

  **************************************************/

 

@@ -255,7 +341,123 @@

 

 static int b43_phy_ht_op_init(struct b43_wldev *dev)

 {

+      u16 tmp;

+      u16 clip_state[3];

+

    b43_phy_ht_tables_init(dev);

+      b43_phy_mask(dev, 0x0be, ~0x2);

+      b43_phy_set(dev, 0x23f, 0x7ff);

+      b43_phy_set(dev, 0x240, 0x7ff);

+      b43_phy_set(dev, 0x241, 0x7ff);

+

+      b43_phy_ht_zero_extg(dev);

+

+      b43_phy_mask(dev, B43_PHY_EXTG(0), ~0x3);

+

+      b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0);

+      b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0);

+      b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0);

+

+      b43_phy_write(dev, B43_PHY_EXTG(0x103), 0x20);

+      b43_phy_write(dev, B43_PHY_EXTG(0x101), 0x20);

+      b43_phy_write(dev, 0x20d, 0xb8);

+      b43_phy_write(dev, B43_PHY_EXTG(0x14f), 0xc8);

+      b43_phy_write(dev, 0x70, 0x50);

+      b43_phy_write(dev, 0x1ff, 0x30);

+

+      if (0) /* TODO: condition */

+         ; /* TODO: PHY op on reg 0x217 */

+

+      b43_phy_read(dev, 0xb0); /* TODO: what for? */

+      b43_phy_set(dev, 0xb0, 0x1);

+

+      b43_phy_set(dev, 0xb1, 0x91);

+      b43_phy_write(dev, 0x32f, 0x0003);

+      b43_phy_write(dev, 0x077, 0x0010);

+      b43_phy_write(dev, 0x0b4, 0x0258);

+      b43_phy_mask(dev, 0x17e, ~0x4000);

+

+      b43_phy_write(dev, 0x0b9, 0x0072);

+

+      b43_httab_write_few(dev, B43_HTTAB16(7, 0x14e), 2, 0x010f, 0x010f);

+      b43_httab_write_few(dev, B43_HTTAB16(7, 0x15e), 2, 0x010f, 0x010f);

+      b43_httab_write_few(dev, B43_HTTAB16(7, 0x16e), 2, 0x010f, 0x010f);

+

+      b43_phy_ht_afe_unk1(dev);

+

+      b43_httab_write_few(dev, B43_HTTAB16(7, 0x130), 9, 0x777, 0x111, 0x111,

+             0x777, 0x111, 0x111, 0x777, 0x111, 0x111);

+

+      b43_httab_write(dev, B43_HTTAB16(7, 0x120), 0x0777);

+      b43_httab_write(dev, B43_HTTAB16(7, 0x124), 0x0777);

+

+      b43_httab_write(dev, B43_HTTAB16(8, 0x00), 0x02);

+      b43_httab_write(dev, B43_HTTAB16(8, 0x10), 0x02);

+      b43_httab_write(dev, B43_HTTAB16(8, 0x20), 0x02);

+

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x08), 4,

+             0x8e, 0x96, 0x96, 0x96);

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x18), 4,

+             0x8f, 0x9f, 0x9f, 0x9f);

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x28), 4,

+             0x8f, 0x9f, 0x9f, 0x9f);

+

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x0c), 4, 0x2, 0x2, 0x2, 0x2);

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x1c), 4, 0x2, 0x2, 0x2, 0x2);

+      b43_httab_write_few(dev, B43_HTTAB16(8, 0x2c), 4, 0x2, 0x2, 0x2, 0x2);

+

+      b43_phy_maskset(dev, 0x0280, 0xff00, 0x3e);

+      b43_phy_maskset(dev, 0x0283, 0xff00, 0x3e);

+      b43_phy_maskset(dev, B43_PHY_OFDM(0x0141), 0xff00, 0x46);

+      b43_phy_maskset(dev, 0x0283, 0xff00, 0x40);

+

+      b43_httab_write_few(dev, B43_HTTAB16(00, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+      b43_httab_write_few(dev, B43_HTTAB16(01, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+      /* TODO: Did wl mean 2 instead of 40? */

+      b43_httab_write_few(dev, B43_HTTAB16(40, 0x8), 4,

+             0x09, 0x0e, 0x13, 0x18);

+

+      b43_phy_maskset(dev, B43_PHY_OFDM(0x24), 0x3f, 0xd);

+      b43_phy_maskset(dev, B43_PHY_OFDM(0x64), 0x3f, 0xd);

+      b43_phy_maskset(dev, B43_PHY_OFDM(0xa4), 0x3f, 0xd);

+

+      b43_phy_set(dev, B43_PHY_EXTG(0x060), 0x1);

+      b43_phy_set(dev, B43_PHY_EXTG(0x064), 0x1);

+      b43_phy_set(dev, B43_PHY_EXTG(0x080), 0x1);

+      b43_phy_set(dev, B43_PHY_EXTG(0x084), 0x1);

+

+      /* Copy some tables entries */

+      tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x144));

+      b43_httab_write(dev, B43_HTTAB16(7, 0x14a), tmp);

+      tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x154));

+      b43_httab_write(dev, B43_HTTAB16(7, 0x15a), tmp);

+      tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x164));

+      b43_httab_write(dev, B43_HTTAB16(7, 0x16a), tmp);

+

+      /* Reset CCA */

+      b43_phy_force_clock(dev, true);

+      tmp = b43_phy_read(dev, B43_PHY_HT_BBCFG);

+      b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp | B43_PHY_HT_BBCFG_RSTCCA);

+      b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp & ~B43_PHY_HT_BBCFG_RSTCCA);

+      b43_phy_force_clock(dev, false);

+

+      b43_mac_phy_clock_set(dev, true);

+

+      b43_phy_ht_force_rf_sequence(dev, B43_PHY_HT_RF_SEQ_TRIG_RX2TX);

+      b43_phy_ht_force_rf_sequence(dev, B43_PHY_HT_RF_SEQ_TRIG_RST2RX);

+

+      /* TODO: PHY op on reg 0xb0 */

+

+      /* TODO: Should we restore it? Or store it in global PHY info? */

+      b43_phy_ht_read_clip_detection(dev, clip_state);

+

+      if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)

+         b43_phy_ht_bphy_init(dev);

+

+      b43_httab_write_bulk(dev, B43_HTTAB32(0x1a, 0xc0),

+            B43_HTTAB_1A_C0_LATE_SIZE, b43_httab_0x1a_0xc0_late);

 

    return 0;

 }

--- drivers/net/wireless/b43/phy_ht.h.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/phy_ht.h   2011-09-19 17:33:57.179155850 +0800

@@ -3,8 +3,11 @@

 

 #include "phy_common.h"

 

-

+#define B43_PHY_HT_BBCFG               0x001 /* BB config */

+#define  B43_PHY_HT_BBCFG_RSTCCA            0x4000 /* Reset CCA */

+#define  B43_PHY_HT_BBCFG_RSTRX            0x8000 /* Reset RX */

 #define B43_PHY_HT_BANDCTL         0x009 /* Band control */

+#define  B43_PHY_HT_BANDCTL_5GHZ            0x0001 /* Use the 5GHz band */

 #define B43_PHY_HT_TABLE_ADDR         0x072 /* Table address */

 #define B43_PHY_HT_TABLE_DATALO         0x073 /* Table data low */

 #define B43_PHY_HT_TABLE_DATAHI         0x074 /* Table data high */

@@ -15,6 +18,21 @@

 #define B43_PHY_HT_BW5            0x1D2

 #define B43_PHY_HT_BW6            0x1D3

 

+#define B43_PHY_HT_C1_CLIP1THRES      B43_PHY_OFDM(0x00E)

+#define B43_PHY_HT_C2_CLIP1THRES      B43_PHY_OFDM(0x04E)

+#define B43_PHY_HT_C3_CLIP1THRES      B43_PHY_OFDM(0x08E)

+

+#define B43_PHY_HT_RF_SEQ_MODE         B43_PHY_EXTG(0x000)

+#define B43_PHY_HT_RF_SEQ_TRIG         B43_PHY_EXTG(0x003)

+#define  B43_PHY_HT_RF_SEQ_TRIG_RX2TX         0x0001 /* RX2TX */

+#define  B43_PHY_HT_RF_SEQ_TRIG_TX2RX         0x0002 /* TX2RX */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGH         0x0004 /* Update gain H */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGL         0x0008 /* Update gain L */

+#define  B43_PHY_HT_RF_SEQ_TRIG_UPGU         0x0010 /* Update gain U */

+#define  B43_PHY_HT_RF_SEQ_TRIG_RST2RX         0x0020 /* Reset to RX */

+#define B43_PHY_HT_RF_SEQ_STATUS      B43_PHY_EXTG(0x004)

+/* Values for the status are the same as for the trigger */

+

 #define B43_PHY_HT_RF_CTL1         B43_PHY_EXTG(0x010)

 

 #define B43_PHY_HT_AFE_CTL1         B43_PHY_EXTG(0x110)

--- drivers/net/wireless/b43/phy_n.c.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/phy_n.c   2011-09-19 17:44:30.904171535 +0800

@@ -600,49 +600,16 @@

    }

 }

 

-/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */

-static void b43_nphy_bmac_clock_fgc(struct b43_wldev *dev, bool force)

-{

-   u32 tmp;

-

-   if (dev->phy.type != B43_PHYTYPE_N)

-      return;

-

-   switch (dev->dev->bus_type) {

-#ifdef CONFIG_B43_BCMA

-   case B43_BUS_BCMA:

-      tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);

-      if (force)

-         tmp |= BCMA_IOCTL_FGC;

-      else

-         tmp &= ~BCMA_IOCTL_FGC;

-      bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);

-      break;

-#endif

-#ifdef CONFIG_B43_SSB

-   case B43_BUS_SSB:

-      tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);

-      if (force)

-         tmp |= SSB_TMSLOW_FGC;

-      else

-         tmp &= ~SSB_TMSLOW_FGC;

-      ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);

-      break;

-#endif

-   }

-}

-

 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */

 static void b43_nphy_reset_cca(struct b43_wldev *dev)

 {

    u16 bbcfg;

-

-   b43_nphy_bmac_clock_fgc(dev, 1);

+     b43_phy_force_clock(dev, 1);

    bbcfg = b43_phy_read(dev, B43_NPHY_BBCFG);

    b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg | B43_NPHY_BBCFG_RSTCCA);

    udelay(1);

    b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg & ~B43_NPHY_BBCFG_RSTCCA);

-   b43_nphy_bmac_clock_fgc(dev, 0);

+   b43_phy_force_clock(dev, 0);

    b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX);

 }

 

@@ -3715,11 +3682,11 @@

    b43_nphy_workarounds(dev);

 

    /* Reset CCA, in init code it differs a little from standard way */

-   b43_nphy_bmac_clock_fgc(dev, 1);

+   b43_phy_force_clock(dev, 1);

    tmp = b43_phy_read(dev, B43_NPHY_BBCFG);

    b43_phy_write(dev, B43_NPHY_BBCFG, tmp | B43_NPHY_BBCFG_RSTCCA);

    b43_phy_write(dev, B43_NPHY_BBCFG, tmp & ~B43_NPHY_BBCFG_RSTCCA);

-   b43_nphy_bmac_clock_fgc(dev, 0);

+      b43_phy_force_clock(dev, 0);

 

    b43_mac_phy_clock_set(dev, true);

 

--- drivers/net/wireless/b43/pio.c.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/pio.c   2011-09-19 17:48:02.734176776 +0800

@@ -675,8 +675,16 @@

       err_msg = "len == 0";

       goto rx_error;

    }

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

+            macstat = le32_to_cpu(rxhdr->format_598.mac_status);

+            break;

+      case B43_FW_HDR_410:

+      case B43_FW_HDR_351:

+            macstat = le32_to_cpu(rxhdr->format_351.mac_status);

+            break;

+   }

 

-   macstat = le32_to_cpu(rxhdr->mac_status);

    if (macstat & B43_RX_MAC_FCSERR) {

       if (!(q->dev->wl->filter_flags & FIF_FCSFAIL)) {

          /* Drop frames with failed FCS. */

--- drivers/net/wireless/b43/tables_phy_ht.c.orig   2011-09-19 15:02:07.575930391 +0800

+++ drivers/net/wireless/b43/tables_phy_ht.c   2011-09-19 17:52:30.355183409 +0800

@@ -574,6 +574,42 @@

    0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,

 };

 

+/* Some late-init table */

+const u32 b43_httab_0x1a_0xc0_late[] = {

+   0x10f90040, 0x10e10040, 0x10e1003c, 0x10c9003d,

+   0x10b9003c, 0x10a9003d, 0x10a1003c, 0x1099003b,

+   0x1091003b, 0x1089003a, 0x1081003a, 0x10790039,

+   0x10710039, 0x1069003a, 0x1061003b, 0x1059003d,

+   0x1051003f, 0x10490042, 0x1049003e, 0x1049003b,

+   0x1041003e, 0x1041003b, 0x1039003e, 0x1039003b,

+   0x10390038, 0x10390035, 0x1031003a, 0x10310036,

+   0x10310033, 0x1029003a, 0x10290037, 0x10290034,

+   0x10290031, 0x10210039, 0x10210036, 0x10210033,

+   0x10210030, 0x1019003c, 0x10190039, 0x10190036,

+   0x10190033, 0x10190030, 0x1019002d, 0x1019002b,

+   0x10190028, 0x1011003a, 0x10110036, 0x10110033,

+   0x10110030, 0x1011002e, 0x1011002b, 0x10110029,

+   0x10110027, 0x10110024, 0x10110022, 0x10110020,

+   0x1011001f, 0x1011001d, 0x1009003a, 0x10090037,

+   0x10090034, 0x10090031, 0x1009002e, 0x1009002c,

+   0x10090029, 0x10090027, 0x10090025, 0x10090023,

+   0x10090021, 0x1009001f, 0x1009001d, 0x1009001b,

+   0x1009001a, 0x10090018, 0x10090017, 0x10090016,

+   0x10090015, 0x10090013, 0x10090012, 0x10090011,

+   0x10090010, 0x1009000f, 0x1009000f, 0x1009000e,

+   0x1009000d, 0x1009000c, 0x1009000c, 0x1009000b,

+   0x1009000a, 0x1009000a, 0x10090009, 0x10090009,

+   0x10090008, 0x10090008, 0x10090007, 0x10090007,

+   0x10090007, 0x10090006, 0x10090006, 0x10090005,

+   0x10090005, 0x10090005, 0x10090005, 0x10090004,

+   0x10090004, 0x10090004, 0x10090004, 0x10090003,

+   0x10090003, 0x10090003, 0x10090003, 0x10090003,

+   0x10090003, 0x10090002, 0x10090002, 0x10090002,

+   0x10090002, 0x10090002, 0x10090002, 0x10090002,

+   0x10090002, 0x10090002, 0x10090001, 0x10090001,

+   0x10090001, 0x10090001, 0x10090001, 0x10090001,

+};

+

 /**************************************************

  * R/W ops.

  **************************************************/

@@ -674,6 +710,51 @@

    return;

 }

 

+void b43_httab_write_few(struct b43_wldev *dev, u32 offset, size_t num, ...)

+{

+   va_list args;

+   u32 type, value;

+   unsigned int i;

+

+   type = offset & B43_HTTAB_TYPEMASK;

+   offset &= 0xFFFF;

+

+   va_start(args, num);

+   switch (type) {

+   case B43_HTTAB_8BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         B43_WARN_ON(value & ~0xFF);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);

+      }

+      break;

+   case B43_HTTAB_16BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         B43_WARN_ON(value & ~0xFFFF);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);

+      }

+      break;

+   case B43_HTTAB_32BIT:

+      b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);

+      for (i = 0; i < num; i++) {

+         value = va_arg(args, int);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI,

+                  value >> 16);

+         b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO,

+                  value & 0xFFFF);

+      }

+      break;

+   default:

+      B43_WARN_ON(1);

+   }

+   va_end(args);

+

+   return;

+}

+

 void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,

            unsigned int nr_elements, const void *_data)

 {

@@ -723,6 +804,9 @@

    } while (0)

 void b43_phy_ht_tables_init(struct b43_wldev *dev)

 {

+   BUILD_BUG_ON(ARRAY_SIZE(b43_httab_0x1a_0xc0_late) !=

+         B43_HTTAB_1A_C0_LATE_SIZE);

+

    httab_upload(dev, B43_HTTAB16(0x12, 0), b43_httab_0x12);

    httab_upload(dev, B43_HTTAB16(0x27, 0), b43_httab_0x27);

    httab_upload(dev, B43_HTTAB16(0x26, 0), b43_httab_0x26);

--- drivers/net/wireless/b43/tables_phy_ht.h.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/tables_phy_ht.h   2011-09-19 17:56:37.257189524 +0800

@@ -14,9 +14,12 @@

 void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,

           unsigned int nr_elements, void *_data);

 void b43_httab_write(struct b43_wldev *dev, u32 offset, u32 value);

+void b43_httab_write_few(struct b43_wldev *dev, u32 offset, size_t num, ...);

 void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,

            unsigned int nr_elements, const void *_data);

 

 void b43_phy_ht_tables_init(struct b43_wldev *dev);

+#define B43_HTTAB_1A_C0_LATE_SIZE      128

+extern const u32 b43_httab_0x1a_0xc0_late[];

 

 #endif /* B43_TABLES_PHY_HT_H_ */

--- drivers/net/wireless/b43/xmit.c.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/xmit.c   2011-09-19 18:44:55.413261171 +0800

@@ -337,12 +337,19 @@

          memcpy(txhdr->iv, ((u8 *) wlhdr) + wlhdr_len, iv_len);

       }

    }

-   if (b43_is_old_txhdr_format(dev)) {

-      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp),

+        switch (dev->fw.hdr_format) {

+         case B43_FW_HDR_598:

+               b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_598.plcp),

                   plcp_fragment_len, rate);

-   } else {

-      b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->new_format.plcp),

+         break;

+      case B43_FW_HDR_351:

+            b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_351.plcp),

+                  plcp_fragment_len, rate);

+         break;

+      case B43_FW_HDR_410:

+            b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_410.plcp),

                   plcp_fragment_len, rate);

+         break;

    }

    b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb),

                plcp_fragment_len, rate_fb);

@@ -415,10 +422,10 @@

    if ((rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||

        (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) {

       unsigned int len;

-      struct ieee80211_hdr *hdr;

+      struct ieee80211_hdr *uninitialized_var(hdr);

       int rts_rate, rts_rate_fb;

       int rts_rate_ofdm, rts_rate_fb_ofdm;

-      struct b43_plcp_hdr6 *plcp;

+      struct b43_plcp_hdr6 *uninitialized_var(plcp);

       struct ieee80211_rate *rts_cts_rate;

 

       rts_cts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info);

@@ -429,14 +436,22 @@

       rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);

 

       if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {

-         struct ieee80211_cts *cts;

+               struct ieee80211_cts *uninitialized_var(cts);

 

-         if (b43_is_old_txhdr_format(dev)) {

-            cts = (struct ieee80211_cts *)

-               (txhdr->old_format.rts_frame);

-         } else {

+         switch (dev->fw.hdr_format) {

+         case B43_FW_HDR_598:

             cts = (struct ieee80211_cts *)

-               (txhdr->new_format.rts_frame);

+            (txhdr->format_598.rts_frame);

+              break;

+         case B43_FW_HDR_351:

+

+         cts = (struct ieee80211_cts *)

+         (txhdr->format_351.rts_frame);

+               break;

+         case B43_FW_HDR_410:

+              cts = (struct ieee80211_cts *)

+              (txhdr->format_410.rts_frame);

+              break;

          }

          ieee80211_ctstoself_get(dev->wl->hw, info->control.vif,

                   fragment_data, fragment_len,

@@ -444,14 +459,22 @@

          mac_ctl |= B43_TXH_MAC_SENDCTS;

          len = sizeof(struct ieee80211_cts);

       } else {

-         struct ieee80211_rts *rts;

 

-         if (b43_is_old_txhdr_format(dev)) {

+         struct ieee80211_rts *uninitialized_var(rts);

+

+               switch (dev->fw.hdr_format) {

+               case B43_FW_HDR_598:

             rts = (struct ieee80211_rts *)

-               (txhdr->old_format.rts_frame);

-         } else {

+                  (txhdr->format_598.rts_frame);

+                 break;

+           case B43_FW_HDR_351:

+              rts = (struct ieee80211_rts *)

+                (txhdr->format_351.rts_frame);

+              break;

+         case B43_FW_HDR_410:

             rts = (struct ieee80211_rts *)

-               (txhdr->new_format.rts_frame);

+                 (txhdr->format_410.rts_frame);

+                 break;

          }

          ieee80211_rts_get(dev->wl->hw, info->control.vif,

                  fragment_data, fragment_len,

@@ -462,22 +485,35 @@

       len += FCS_LEN;

 

       /* Generate the PLCP headers for the RTS/CTS frame */

-      if (b43_is_old_txhdr_format(dev))

-         plcp = &txhdr->old_format.rts_plcp;

-      else

-         plcp = &txhdr->new_format.rts_plcp;

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

+         plcp = &txhdr->format_598.rts_plcp;

+         break;

+      case B43_FW_HDR_351:

+         plcp = &txhdr->format_351.rts_plcp;

+         break;

+      case B43_FW_HDR_410:

+         plcp = &txhdr->format_410.rts_plcp;

+         break;

+      }

       b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,

                   len, rts_rate);

       plcp = &txhdr->rts_plcp_fb;

       b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,

                   len, rts_rate_fb);

-

-      if (b43_is_old_txhdr_format(dev)) {

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

          hdr = (struct ieee80211_hdr *)

-            (&txhdr->old_format.rts_frame);

-      } else {

+                  (&txhdr->format_598.rts_frame);

+               break;

+            case B43_FW_HDR_351:

+               hdr = (struct ieee80211_hdr *)

+                  (&txhdr->format_351.rts_frame);

+               break;

+            case B43_FW_HDR_410:

          hdr = (struct ieee80211_hdr *)

-            (&txhdr->new_format.rts_frame);

+              (&txhdr->format_410.rts_frame);

+               break;

       }

       txhdr->rts_dur_fb = hdr->duration_id;

 

@@ -505,10 +541,18 @@

    }

 

    /* Magic cookie */

-   if (b43_is_old_txhdr_format(dev))

-      txhdr->old_format.cookie = cpu_to_le16(cookie);

-   else

-      txhdr->new_format.cookie = cpu_to_le16(cookie);

+

+      switch (dev->fw.hdr_format) {

+      case B43_FW_HDR_598:

+            txhdr->format_598.cookie = cpu_to_le16(cookie);

+            break;

+      case B43_FW_HDR_351:

+            txhdr->format_351.cookie = cpu_to_le16(cookie);

+            break;

+      case B43_FW_HDR_410:

+            txhdr->format_410.cookie = cpu_to_le16(cookie);

+            break;

+      }

 

    if (phy->type == B43_PHYTYPE_N) {

       txhdr->phy_ctl1 =

@@ -611,8 +655,9 @@

    struct ieee80211_hdr *wlhdr;

    const struct b43_rxhdr_fw4 *rxhdr = _rxhdr;

    __le16 fctl;

-   u16 phystat0, phystat3, chanstat, mactime;

-   u32 macstat;

+   u16 phystat0, phystat3;

+   u16 uninitialized_var(chanstat), uninitialized_var(mactime);

+   u32 uninitialized_var(macstat);

    u16 chanid;

    u16 phytype;

    int padding;

@@ -622,9 +667,19 @@

    /* Get metadata about the frame from the header. */

    phystat0 = le16_to_cpu(rxhdr->phy_status0);

    phystat3 = le16_to_cpu(rxhdr->phy_status3);

-   macstat = le32_to_cpu(rxhdr->mac_status);

-   mactime = le16_to_cpu(rxhdr->mac_time);

-   chanstat = le16_to_cpu(rxhdr->channel);

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      macstat = le32_to_cpu(rxhdr->format_598.mac_status);

+      mactime = le16_to_cpu(rxhdr->format_598.mac_time);

+      chanstat = le16_to_cpu(rxhdr->format_598.channel);

+      break;

+   case B43_FW_HDR_410:

+   case B43_FW_HDR_351:

+      macstat = le32_to_cpu(rxhdr->format_351.mac_status);

+      mactime = le16_to_cpu(rxhdr->format_351.mac_time);

+      chanstat = le16_to_cpu(rxhdr->format_351.channel);

+      break;

+   }

    phytype = chanstat & B43_RX_CHAN_PHYTYPE;

 

    if (unlikely(macstat & B43_RX_MAC_FCSERR)) {

@@ -744,6 +799,7 @@

       break;

    case B43_PHYTYPE_N:

    case B43_PHYTYPE_LP:

+   case B43_PHYTYPE_HT:

       /* chanid is the SHM channel cookie. Which is the plain

        * channel number in b43. */

       if (chanstat & B43_RX_CHAN_5GHZ) {

--- drivers/net/wireless/b43/xmit.h.orig   2011-09-19 15:02:07.000000000 +0800

+++ drivers/net/wireless/b43/xmit.h   2011-09-19 19:00:48.981284843 +0800

@@ -46,7 +46,25 @@

    __le32 timeout;         /* Timeout */

 

    union {

-      /* The new r410 format. */

+      /* Tested with 598.314, 644.1001 and 666.2 */

+      struct {

+            __le16 mimo_antenna;            /* MIMO antenna select */

+            __le16 preload_size;            /* Preload size */

+            PAD_BYTES(2);

+            __le16 cookie;                  /* TX frame cookie */

+            __le16 tx_status;               /* TX status */

+             __le16 max_n_mpdus;

+             __le16 max_a_bytes_mrt;

+              __le16 max_a_bytes_fbr;

+             __le16 min_m_bytes;

+            struct b43_plcp_hdr6 rts_plcp;  /* RTS PLCP header */

+             __u8 rts_frame[16];             /* The RTS frame (if used) */

+             PAD_BYTES(2);

+             struct b43_plcp_hdr6 plcp;      /* Main PLCP header */

+        } format_598 __packed;

+      

+            /* Tested with 410.2160, 478.104 and 508.* */

+

       struct {

          __le16 mimo_antenna;      /* MIMO antenna select */

          __le16 preload_size;      /* Preload size */

@@ -57,9 +75,9 @@

          __u8 rts_frame[16];      /* The RTS frame (if used) */

          PAD_BYTES(2);

          struct b43_plcp_hdr6 plcp;   /* Main PLCP header */

-      } new_format __packed;

+            } format_410 __packed;

 

-      /* The old r351 format. */

+       /* Tested with 351.126 */

       struct {

          PAD_BYTES(2);

          __le16 cookie;         /* TX frame cookie */

@@ -68,7 +86,7 @@

          __u8 rts_frame[16];      /* The RTS frame (if used) */

          PAD_BYTES(2);

          struct b43_plcp_hdr6 plcp;   /* Main PLCP header */

-      } old_format __packed;

+            } format_351 __packed;

 

    } __packed;

 } __packed;

@@ -166,19 +184,19 @@

 #define  B43_TXH_PHY1_MODUL_QAM256   0x2000 /* QAM256 */

 

 

-/* r351 firmware compatibility stuff. */

-static inline

-bool b43_is_old_txhdr_format(struct b43_wldev *dev)

-{

-   return (dev->fw.rev <= 351);

-}

-

 static inline

 size_t b43_txhdr_size(struct b43_wldev *dev)

 {

-   if (b43_is_old_txhdr_format(dev))

+   switch (dev->fw.hdr_format) {

+   case B43_FW_HDR_598:

+      return 112 + sizeof(struct b43_plcp_hdr6);

+   case B43_FW_HDR_410:

+      return 104 + sizeof(struct b43_plcp_hdr6);

+   case B43_FW_HDR_351:

       return 100 + sizeof(struct b43_plcp_hdr6);

-   return 104 + sizeof(struct b43_plcp_hdr6);

+   }

+  return 0;

+

 }

 

 

@@ -234,9 +252,23 @@

    } __packed;

    __le16 phy_status2;   /* PHY RX Status 2 */

    __le16 phy_status3;   /* PHY RX Status 3 */

-   __le32 mac_status;   /* MAC RX status */

-   __le16 mac_time;

-   __le16 channel;

+      union {

+            /* Tested with 598.314, 644.1001 and 666.2 */

+            struct {

+               __le16 phy_status4;   /* PHY RX Status 4 */

+               __le16 phy_status5;   /* PHY RX Status 5 */

+               __le32 mac_status;   /* MAC RX status */

+               __le16 mac_time;

+               __le16 channel;

+            } format_598 __packed;

+

+            /* Tested with 351.126, 410.2160, 478.104 and 508.* */

+            struct {

+               __le32 mac_status;   /* MAC RX status */

+               __le16 mac_time;

+               __le16 channel;

+            } format_351 __packed;

+      } __packed;

 } __packed;

 

 /* PHY RX Status 0 */

--- include/linux/bcma/bcma_driver_chipcommon.h.orig   2011-09-19 15:02:17.345930632 +0800

+++ include/linux/bcma/bcma_driver_chipcommon.h   2011-09-19 19:01:39.426286092 +0800

@@ -239,6 +239,22 @@

 #define BCMA_CC_SPROM         0x0800 /* SPROM beginning */

 #define BCMA_CC_SPROM_PCIE6      0x0830 /* SPROM beginning on PCIe rev >= 6 */

 

+/* BCM4331 ChipControl numbers. */

+#define BCMA_CHIPCTL_4331_BT_COEXIST      BIT(0)   /* 0 disable */

+#define BCMA_CHIPCTL_4331_SECI         BIT(1)   /* 0 SECI is disabled (JATG functional) */

+#define BCMA_CHIPCTL_4331_EXT_LNA      BIT(2)   /* 0 disable */

+#define BCMA_CHIPCTL_4331_SPROM_GPIO13_15   BIT(3)   /* sprom/gpio13-15 mux */

+#define BCMA_CHIPCTL_4331_EXTPA_EN      BIT(4)   /* 0 ext pa disable, 1 ext pa enabled */

+#define BCMA_CHIPCTL_4331_GPIOCLK_ON_SPROMCS   BIT(5)   /* set drive out GPIO_CLK on sprom_cs pin */

+#define BCMA_CHIPCTL_4331_PCIE_MDIO_ON_SPROMCS   BIT(6)   /* use sprom_cs pin as PCIE mdio interface */

+#define BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5   BIT(7)   /* aband extpa will be at gpio2/5 and sprom_dout */

+#define BCMA_CHIPCTL_4331_OVR_PIPEAUXCLKEN   BIT(8)   /* override core control on pipe_AuxClkEnable */

+#define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN   BIT(9)   /* override core control on pipe_AuxPowerDown */

+#define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN      BIT(10)   /* pcie_auxclkenable */

+#define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN   BIT(11)   /* pcie_pipe_pllpowerdown */

+#define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4   BIT(16)   /* enable bt_shd0 at gpio4 */

+#define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5   BIT(17)   /* enable bt_shd1 at gpio5 */

+

 /* Data for the PMU, if available.

  * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)

  */

@@ -275,6 +291,8 @@

 extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);

 extern void bcma_chipco_resume(struct bcma_drv_cc *cc);

 

+void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);

+

 extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc,

                  u32 ticks);

 

--- drivers/net/wireless/b43/phy_common.c.orig   2011-09-19 19:59:48.362519870 +0800

+++ drivers/net/wireless/b43/phy_common.c   2011-09-19 20:25:28.796557994 +0800

@@ -448,6 +448,38 @@

       channel_type == NL80211_CHAN_HT40PLUS);

 }

 

+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */

+void b43_phy_force_clock(struct b43_wldev *dev, bool force)

+{

+   u32 tmp;

+

+   WARN_ON(dev->phy.type != B43_PHYTYPE_N &&

+      dev->phy.type != B43_PHYTYPE_HT);

+

+   switch (dev->dev->bus_type) {

+#ifdef CONFIG_B43_BCMA

+   case B43_BUS_BCMA:

+      tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);

+      if (force)

+         tmp |= BCMA_IOCTL_FGC;

+      else

+         tmp &= ~BCMA_IOCTL_FGC;

+      bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);

+      break;

+#endif

+#ifdef CONFIG_B43_SSB

+   case B43_BUS_SSB:

+      tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);

+      if (force)

+         tmp |= SSB_TMSLOW_FGC;

+      else

+         tmp &= ~SSB_TMSLOW_FGC;

+      ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);

+      break;

+#endif

+   }

+}

+

 /* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */

 struct b43_c32 b43_cordic(int theta)

 {

```

Some observations and wishes:

The indicating wireless signal level is relatively low. For instance, the signal strength should be over 80% (for other usb wireless dongle) but now it shows below 30%.. But the network traffic is good and stable..

Testing i915 driver didn't work, if I add the xorg conf for that card, the screen turns into dark...

Wish the i915 and vgaswitcheroo will do the work very soon..

thanks....

----------

## gw

 *alvinwu wrote:*   

> I'm using macbook pro 8,2, and like to share with you about various problems.
> 
> 1. broadcom bcm4331 wireless card still not work;
> 
> 2. efi boot with radeon bios patch from file (/lib/firmware/radoen/vbios.bin) works on linux-3.1.0-git3, but crashes with newer kernels;
> ...

 

Hi alvinwu,

thanks for this very interesting post indeed!!

I have exactly your machine: can you, even if very brief, describe the steps you went (and docs you read) to install gentoo (dual boot) on it. I'd be really grateful if you could do that!

Thanks

gw

----------

## alvinwu

Hi gw,

I assume you'll use gentoo as your target platform and familiar with gentoo tools. I try to make it as simple as possible, actually not all steps are correctly memorized as I did try many many methods and myself may confuse.......  :Laughing: 

1. boot into OSX, 

2. use "diskutil" to partition your disk: example

```
diskutil resizeVolume disk0s2 100G "MS-DOS FAT32" "Linux" 500G "MS-DOS FAT32" "Win 7" 149.8G
```

 *Quote:*   

> READ: various web site about macbook pro dual boot (or triple boot)

 

This way, your disk is ready for triple boot... You may fine tune yourself for dual boot only.

Install Win7 into the last partition if you want to.

 *Quote:*   

> NOTE: you may have to repeat the above diskutil process to change the Linux partition in HFS type partition, otherwise Win7 may install into the first recognized partition which makes it unbootable. Also beware to familiar with OSX partition/disk utility tools to recover / repair the incorrect partitioning steps

 

3. prepare a ubuntu live cd to boot the mbp8,2; I haven't try gentoo live cd, but someone said booting with maxcpu=1 option should work as well;

 *Quote:*   

> ready a wired network connection, the wireless cards won't work.

 

4. Boot into a working environment, prepare a chroot terminal for downloading and installing gentoo packages;

 *Quote:*   

> READ: gentoo install quide

 

5. Well prepare your /etc/make.conf and other critical gentoo specific emerge settings such as /etc/portage/package.use....etc;

 *Quote:*   

> VIDEO:VIDEO_CARDS="vesa fbdev radeon intel" 

 

 *Quote:*   

> OTHERS: INPUT_DEVICES="keyboard synaptics mtrack evdev"

 

6. You may now choose to select default grub-0.99 be your bootloader, or grub2 ... which I use bzr to download the latest branch; If you choose grub1 (aka grub-0.99...), remember to install in /dev/sdaX....not into the MBR;

 *Quote:*   

> About grub1, bios mode, use kernel version 2.39xx instead of version 3.x; I haven;t try version 3.x in grub1 booting.

 

 *Quote:*   

> READ: grub2 efi boot

 

7. When everythings fine, boot OSX and install rFEIT; (Remember to choose ext2 file system support while installing it. Then execute the enable-always script)

8. You should now be able to dual boot, and Gentoo Linux in bios mode;

9. To proceed into efi boot and apply all those patches above; follow here:

 *Quote:*   

> READ: gentoo, gentoo-wiki, ubuntu, archlinux web site forums, there are plenty discussion about mbp 8,1 ......

 

10. First, you have to dump the radeon bios memory into a file:

```
dd if=/dev/mem of=vbios.bin bs=65536 skip=12 count=1

```

move that file into /lib/firmware/radeon/

11. I use gnome3, if you like to try, create the overlay: layman -a gnome; then read the README inside that /var/lib/layman/gnome;

12. Use grub2;

```
bzr branch bzr://bzr.savannah.gnu.org/grub/trunk/grub grub
```

```
./autogen.sh

./configure --with-platform=efi --target=x86_64 --program-prefix=""

......

....

./grub-mkimage -d ./grub-core -O x86_64-efi -p "" -o grub.efi part_gpt hfsplus fat ext2 normal chain boot configfile linux ls search search_fs_file search_fs_uuid search_label help echo font password_pbkdf2

```

13. prepare 3.1 kernel

```
emerge =git-sources-3.1_rc6
```

14. apply all the patches above, use my kernel config file, fine tune yourself if needed;

15. copy the video.lst file (in the grub2 contents...) into /boot/grub/directory;

My contents is:

```
efi_gop

efi_uga

video_bochs

video_cirrus

```

16. Then do your favourites in /usr/local/etc/default and /usr/local/etc/.....etc.

 *Quote:*   

> READ: grub2 related materials.

 

17. grub-mkconfig -o grub.cfg 

 *Quote:*   

> Examine your newly created grub.cfg

 

18. Copy all those *.mod *.lst grub.efi grub.cfg into /dev/sda1/EFI/BOOT/l

19. When you reboot, you should see a newly create boot icon at rEFIT .....;

That's it! 

You should now have a pretty good looking and stable working mbp8,2, of course, still some more problems waiting to be fixed by the opensoure programmers and contributors..

----------

## alvinwu

Hi,

Forget to mention about the b43 driver:

After you apply all the b43 patches, visit:

http://linuxwireless.org/en/users/Drivers/b43

Follow the instruction to download, build and extract the firmwares.

Remember to uninstall those b43...xxx.... packages from gentoo packages.

----------

## alvinwu

upon adding the following file, the mbp can resume normal after suspend to ram, while working with wireless networks:

/etc/pm/config.d/modules

SUSPEND_MODULES="b43 bcma"

---> with package pm-utils installed

Now the wireless, radeon video, external HDMI monitor, sdcard reader, suspend to ram, web-cam, keyboard, trackpad...all works fine!!  :Cool: 

Software: kernel git-3.1.0-rc9, gnome-3.2, 

Some minor problems waiting to be fixed:

i915 IGU, video card dynamic switching.

BTW. I haven't test hibernation since I only use swap file currently...

----------

## alvinwu

Something more,

I had to  blacklist the i915 module and add the following file into the /etc/X11/xorg.conf.d/ directory:

## /etc/X11/xorg.conf.d/01-radeon-mbp82.conf

Section "Device"

	Identifier   "Card0"

	Driver       "radeon"

	BusID        "1:0:0"

#	Option		"DynamicPM"	"1"

	Option		"ColorTiling"	"1"

#	Option		"ClockGating"	"1"

	Option		"ForceLowPowerMode"	"1"

EndSection

-----------------------------------------------------------------------------------

Also, if you have problem copying those patches above, you may try download the patches directly from the link below:

http://www.eternalit.com/~alvin/download/

----------

## gw

Hi alvin,

thanks a lot for your answer on setting up gentoo on the macbook pro8,2! I'm sorry for the long delay, I was hospitalized and had to undergo surgery, that kept me from coming back here.

I am now trying to follow your steps but I had to introduce an extra layer of complexity as I'm trying to boot a fully encrypted root filesystem (dm-crypt and cryptsetup LUKS), by using an initramdisk that decrypts the real root and then switches to it. See: http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS. This is already a non trivial task and up to now, I don't know how this can be combined with your setup, -- especially with the whole boot process, complicated on the one hand by efi-boot, on the other by the initramdisk.

Can you check here from time to time for further clarification and also, as you did, to report your own progress in getting the hardware to work. I, and surely others too, would very much appreciate that.

It would be nice to make this thread a source of information on the gentoo-macbookpro8,2 issues!

thanks

gw

----------

## TanNewt

I've started getting my late 2011 mbp 8,2 going using this guide. So far I've needed the radeon firmware kernel patch but not the apple-hid patch. I haven't gotten wireless working yet. I'm doing the EFI boot.

The Ubuntu thread is a huge help: http://ubuntuforums.org/showthread.php?t=1695746

----------

## alvinwu

I should update that the patches posted above may have typo mistakes.

Please refer to the following forum to download the patches directly:

https://forums.gentoo.org/viewtopic-t-897794.html

That should work under sysv openrc enviro, but b43 still have problem under systemd init enviro..

Detail in the forum:

https://forums.gentoo.org/viewtopic-t-898570.html?sid=a8b24f2829ee9dadd0ddded75c4cbc8c

----------

## alvinwu

Hi gw,

I study a while and test the following:

Because the boot partition must be in an unencrypted partition, I have to move those /boot/ contents (and the related grub png images files and other fonts files...etc) all inside a subdirectory, say, inside /dev/sda1/EFI/BOOT/kernel/, --> kernel.img, initramfs.img, System.map ...etc.

Or setup any other external boot device.

 *Quote:*   

> 
> 
> Modify the /EFI/BOOT/grub.cfg content:
> 
> delete: set root=(hd0,gpt3)
> ...

 

Use the same approach to modify your other related images files...etc; simply saying is to put all those files inside this DOS partition and use --search --fs-uuid ...... to tell grub the new location. Since grub cannot locate any readable files in the encrypted partition yet.

That works to boot up my machine. Though not yet cryptsetup my harddisk yet...I believe that should work to go ahead for your objective. 

I found that following may add complexity under my environment.

1. I'm running systemd rather than openrc, cryptsetup not yet tested or setup ...

2. You may need to hack a lot for grub2 related files;

3. You also may need to hack a lot for the initramfs setup; or even build your own init script;

4. Dracut didn't work in my systemd environment;

So this is a bit complicate but may be possible under openrc environment, just share with us about your findings.

----------

## andybotting

These instructions are great.

I have been following the Ubuntu forum thread about booting the Macbook Pro with EFI very closely, and finally got it to work with the Intel card.

If it helps, here is my grub.conf, with the options you'll need to disable the radeon and switch the display to the Intel card.

```

menuentry 'Gentoo' --class ubuntu --class gnu-linux --class gnu --class os {

   insmod part_gpt

   insmod ext2

   search --no-floppy --fs-uuid --set=root a73683e1-8aa5-4138-ad1c-a2b6c90833d3

   set gfxpayload=$linux_gfx_mode

   # Switch gmux to IGD

   outb 0x728 1

   outb 0x710 2

   outb 0x740 2

   # Power down ATI

   outb 0x750 0

   # Boot

   linux /kernel-genkernel-x86_64-3.1.0 root=/dev/ram0 real_root=/dev/mapper/vg-gentoo init=/linuxrc dolvm rootfstype=ext4 reboot=pci acpi_backlight=vendor pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_channels=2 i915.modeset=1 i915.lvds_use_ssc=0

   initrd /initramfs-genkernel-x86_64-3.1.0

}

```

This does require the Intel i915 LVDS patches too. I can provide a patchset with everything you need to make it work on kernel 3.1.0.

One thing I've found is that I get a lot of image corruption, and strange artifacts - especially after suspending and resuming. Every suspend/resume cycle seems to make the corruption worse. My battery life is *much* better though.

----------

## dentifrice_

 *andybotting wrote:*   

> These instructions are great.
> 
> I have been following the Ubuntu forum thread about booting the Macbook Pro with EFI very closely, and finally got it to work with the Intel card.
> 
> 

 

Same here, but it's quite  a mess, as there's many patches flying around for different (and sometimes contradictory) purposes.

 *andybotting wrote:*   

> 
> 
> If it helps, here is my grub.conf, with the options you'll need to disable the radeon and switch the display to the Intel card.
> 
> 

 

I use that too, and I think you can safely drop the following options (unless you found them useful for something, in which case I'd love to know!):

reboot=pci acpi_backlight=vendor pcie_aspm=force i915.i915_enable_rc6=1

I would alss put set gfxpayload=keep, since it prevents the error message in detecting the screen resolution.

 *andybotting wrote:*   

> 
> 
> This does require the Intel i915 LVDS patches too. I can provide a patchset with everything you need to make it work on kernel 3.1.0.
> 
> 

 

How do you manage the backlight? That's the one thing I can't quite get to work properly at the moment. There's no patche for apple_pl, one which alledgly brings support for graphics switching using the common vga_switcheroo mecanism, but I couldn't get it to work. I can't control the keyboard backlight either, and the F keys don't respond. Did you find a way around those restrictions?

 *andybotting wrote:*   

> 
> 
> One thing I've found is that I get a lot of image corruption, and strange artifacts - especially after suspending and resuming. Every suspend/resume cycle seems to make the corruption worse. My battery life is *much* better though.

 

Can you give practical examples, or better, share an excerpt from dmesg? I have weird things going on too, and my logs tend to fill up with traces. Mostly related to apple_bl, intel_hda_audio and IRQ17 resource conflicts as far as I remember.

Another blocker for me is that efifb (I believe it is efifb) generates pixeldust for the first part of the bootup process until inteldrmfb takes over (unless I power-off the radeon card through grub commands). This is highly problematic for I need to type a passphrase at early boot ; so in the best case, I have to type it in front of a blackscreen. I tried using the radeon_bios_fix patch and compiling vbios.bin and the firmware blobs directly into the kernel, which does allow me to later boot display using radeonfb, but it doesn't solve the early boot display which is still scrambled/unreadable.

BTW, I'm using Debian, but I guess we can tips across distros, can't we?

----------

## andybotting

 *Quote:*   

> I use that too, and I think you can safely drop the following options (unless you found them useful for something, in which case I'd love to know!):
> 
> reboot=pci acpi_backlight=vendor pcie_aspm=force i915.i915_enable_rc6=1

 

I had trouble getting the Intel to work without the option: 

```
i915.i915_enable_rc6=1
```

Mind you, once I got it working - I didn't want to touch it again. Took me long enough to get it to work!

I think 

```
acpi_backlight=vendor
```

 tells the kernel that there is a vendor specific way of controlling the backlight. Without it, the kernel will try and use standard ACPI backlight controls, which do nothing.

 *Quote:*   

> How do you manage the backlight? That's the one thing I can't quite get to work properly at the moment. 

 

I just applied the patch that's floating around and set the options for it.

In Gentoo, I use this:

 *Quote:*   

> module_apple_bl_args="use_gmux=1 max_brightness=132000"

 

I guess in debian you'd just drop this into a file in /etc/modprobe.d.

 *Quote:*   

> Can you give practical examples, or better, share an excerpt from dmesg

 

I get no real error messages. It's just that I get little artifacts left behind when switching windows or virtual workspaces The best examples are when I'm using Chromium, the title bar changes colour or the close buttons disappear. In Eclipse, the popups render with strange lines so I basically can't see anything in them.

I'm not sure at this stage if it's the driver (i've used a couple of different versions) or maybe a DRM/compiz type problem.

 *Quote:*   

> Another blocker for me is that efifb (I believe it is efifb) generates pixeldust for the first part of the bootup process until inteldrmfb takes over (unless I power-off the radeon card through grub commands). 

 

Not sure about your kernel, but I compiled the DRM kernels bits directly in - not as modules. I can get the intelfb working straight away. I haven't managed to get the radeon to work with EFI. If I want to use the Radeon, I'll just boot in BIOS mode. I think the real value of EFI boot is the power savings using the Intel card, which you just can't get with the Radeon.

----------

## dentifrice_

 *andybotting wrote:*   

> 
> 
> I had trouble getting the Intel to work without the option: 
> 
> ```
> ...

 

It appears you're right. I thought the issue was resolved in Linux 3.1 but it seems not (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/818830).

This option is related to some bug in the i915 module of the 3.0 kernels causing it to use a lot more power.

I removed it after i915 complained to me about it once, but it may as well have been a typo! Will need to double check.

 *andybotting wrote:*   

> 
> 
> I think 
> 
> ```
> ...

 

Weird, I witnessed the contrary. Removing that kernel option allowed me to change the backlight using xbacklight. I will look further into it.

 *andybotting wrote:*   

> 
> 
>  *Quote:*   How do you manage the backlight? That's the one thing I can't quite get to work properly at the moment.  
> 
> I just applied the patch that's floating around and set the options for it.
> ...

 

Yes, indeed, that's what I use (except for the max_brightness bit which I removed after finding my display way too bright). However, I was asking how you controled the backlight. Throuh echoing values in /sys/class/backlight, or do the f1/f2 keys work for you?

 *andybotting wrote:*   

> 
> 
>  *Quote:*   Another blocker for me is that efifb (I believe it is efifb) generates pixeldust for the first part of the bootup process until inteldrmfb takes over (unless I power-off the radeon card through grub commands).  
> 
> Not sure about your kernel, but I compiled the DRM kernels bits directly in - not as modules. I can get the intelfb working straight away. I haven't managed to get the radeon to work with EFI. If I want to use the Radeon, I'll just boot in BIOS mode. I think the real value of EFI boot is the power savings using the Intel card, which you just can't get with the Radeon.

 

May I ask what precise machine and generation (early or late 2011) you have? 

I personnally haven't managed to boot in BIOS mode from a disk partition (which I was led to believe is because of a restriction in the newer custom UEFI/restricted GPT Apple ships), and though I don't care about using the ATI card, I care about having a visible console from the first second the machine boots (because of the LUKS passphrase prompt). I will try to compile a kernel without efifb and just radeonfb included in the kernel (ideally inteldrmfb if I figure out which kernel option it is exactly, been too tired for that), hoping the display will switch directly to it, bypassing efifb.

----------

## andybotting

Ok, that Ubuntu bug seems to describe the video corruption I'm seeing. I'll have a play and see what the effect is by turning it off.

I'm just using the standard GNOME 2.32 power manager to adjust the backlight, with the normal F1/F2 hotkeys. I used to use the pommed daemon before that, which also works. 

I'm running the MacbookPro8,2 (15-inch model) with the high-resolution glossy display.

 *Quote:*   

> I personnally haven't managed to boot in BIOS mode from a disk partition (which I was led to believe is because of a restriction in the newer custom UEFI/restricted GPT Apple ships

 

I haven't heard anything about boot restrictions on UEFI. Do you have any more information about this? I've not seen any problem, but I do use rEFIt and have a funny partition layout.

I used to triple-boot on a MacbookPro2,1 and to make Windows play nicely, you needed your partitions set up in a certain way, which I have on this new machine also.

I've got:

1. EFI boot parition

2. Mac OS X

3. Linux /boot partition (500MB)

4. Windows NTFS

5. Linux LVM

Due to the GPT/MBR sync tool, only the first 4 partitions are visible by the MBR. This set up lets Windows work, but also GRUB (bios) on my boot partition which lets me boot Gentoo, Ubuntu and Fedora in bios mode, once I copy their kernels and config into it. The root partitions are all in LVM, along with /home and swap. It's a bit of a delicate setup, but everything works. 

 *Quote:*   

>  I will try to compile a kernel without efifb and just radeonfb included in the kernel (ideally inteldrmfb if I figure out which kernel option it is exactly, been too tired for that), hoping the display will switch directly to it, bypassing efifb.

 

I'm pretty sure I'm using inteldrmfb, and when it's compiled into the kernel (or initrd maybe) I get the console right at the start of the boot process. I can send you my kernel config if you're interested. Took a lot of work to get it just right.

----------

## dentifrice_

 *andybotting wrote:*   

> Ok, that Ubuntu bug seems to describe the video corruption I'm seeing. I'll have a play and see what the effect is by turning it off.
> 
> I'm just using the standard GNOME 2.32 power manager to adjust the backlight, with the normal F1/F2 hotkeys. I used to use the pommed daemon before that, which also works. 
> 
> 

 

Damn. I can't get pommed to work with the F1/F2 keys. It does start (and lits the keyboard backlight in the process), but does not respond to any key. I can only set the screen backlight through xbacklight, which is a bit of a pain I must say. Oh, and I did manage to re-activate the acpi_backlight=vendor option after a bit of tweaking, which didn't change a thing in my precise case.

Could you share your pommed config, if you did anything to it? I do get xev codes when pressing F1/F2 though, but they fail to be captured by pommed for some reason.

 *andybotting wrote:*   

> 
> 
> I'm running the MacbookPro8,2 (15-inch model) with the high-resolution glossy display.
> 
> 

 

Same here, but I'm running the latest model from late 2011. The whole MacBookPro series got a subtle refresh at the end of October ; mostly a speed bump with better radeon cards (like I care  :Wink: . Hence my questions. Are you running the early 2011, or late 2011 model? Or, to make it shorter, did you buy your model end of Oct or in November?

 *andybotting wrote:*   

> 
> 
> I haven't heard anything about boot restrictions on UEFI. Do you have any more information about this? I've not seen any problem, but I do use rEFIt and have a funny partition layout.
> 
> 

 

I got this from a chat on November 18th 2011 on ##apple (Freenode): 

 *Quote:*   

> 
> 
> 18:23 <Branes> Apple changed the UEFI structure with the newest MacBook Pro's and the latest iMac refresh.
> 
> 18:23 <Branes> As such, neither rEFIt nor grub (nor grub+) will work.
> ...

 

I'm not sure how much of this is true, given the fact that I can boot in pure EFI and that I did so by adding two more partitions after shrinking the OS X partitions (I actually added one more even - a BIOS boot partition, since I wanted to give BIOS emulation a try), but legacy boot from disk doesn't work on this machine for me (though it has on previous Apple laptops). Not that bad, since I wanted to EFI boot anyway.

 *andybotting wrote:*   

> 
> 
>  *Quote:*    I will try to compile a kernel without efifb and just radeonfb included in the kernel (ideally inteldrmfb if I figure out which kernel option it is exactly, been too tired for that), hoping the display will switch directly to it, bypassing efifb. 
> 
> I'm pretty sure I'm using inteldrmfb, and when it's compiled into the kernel (or initrd maybe) I get the console right at the start of the boot process. I can send you my kernel config if you're interested. Took a lot of work to get it just right.

 

I finally managed to make it work, by removing all framebuffer drivers from the kernel config, including radeon's, and leaving nothing but the intel DRM driver! Quite a victory, as I can now type see the prompt for my passphrase, at last! Note: compiling the intel DRM into the kernel (not as a module) recquires the following kernel options on boot: i915.lvds_channels=2 i915.modeset=1 i915.lvds_use_ssc=0. Still, I'd be interested in getting your .config to compare it with mine.

Apart from correct backlight management, I can't get the SD card reader to work, which outputs some IRQ17 related errors whenever I try to use it and nearly causes a system freeze when I try to mount the SD until I remove it. Does it work out of the box for you too?

----------

## dentifrice_

Hi again,

I summed up my experience on http://dentifrice.poivron.org/laptops/macbookpro8,2/

I still have issues with the following: sdcard reader, screen backlight control, keyboard backlight control

Any feedback/corrections/fixes appreciated.

----------

## alvinwu

Hi,

Your post is very well organized..

Though I'm using early 2011 mbp8.2; things may varies...

I suggest you apply the b43 patches, that SHOULD solve the sd-card problem.....

Also, kernel-3.2 already have that b43 in-place, and the signal strength code in-place as well.... Try that...

----------

## dentifrice_

 *alvinwu wrote:*   

> 
> 
> Your post is very well organized..
> 
> 

 

Thanks. I'll try to add to it as I go. The lack of a resource compiling things that are scattered across the net is pretty discouraging, and I hope to remedy it a little.

 *alvinwu wrote:*   

> 
> 
> Though I'm using early 2011 mbp8.2; things may varies...
> 
> 

 

So far, I've seen no notable difference with issues other people have had — except for the lack of function keys for backlight control and the rest, but I am still to spend time debugging that.

 *alvinwu wrote:*   

> 
> 
> I suggest you apply the b43 patches, that SHOULD solve the sd-card problem.....
> 
> 

 

Wow. That did the trick. Thanks a bunch, I really wouldn't have thought! the BCM4331 and the SD card reader share the same IRQ (17), and thus the card reader cannot work if b43 hasn't been loaded beforehand. I must admit I'm quite puzzled by this, but as long as I can unload b43 (blacklisting brings IRQ17 shutdowns again), I'll be ok.

 *alvinwu wrote:*   

> 
> 
> Also, kernel-3.2 already have that b43 in-place, and the signal strength code in-place as well.... Try that...

 

I tried 3.2rc3, but was unable to get a working intel display (so that's a major setback), although the LVDS dual channel patch did apply. Some people ran into the same issue on ubuntuforums, so it's not just me. Would anyone kernel-savvy and into the i915 driver around here have a clue about the why and how?

----------

## francescofavero

Cool, thanks for the wonderful thread and also the dentifrice_'s blog.

I've applied the patch set to a 3.1.6 and everything is working but the screen back-lights.

The Keyboard backlight are working out of the box, just have to turn it on with the f5/f6 keys (note on a barebone GNOME 3.2 without any pommed or special settings installed).

There are even the on-screen things for the keyboard lights level. The other "fn" keys are perfect without any configuration (ok the launchpad and the mission control keys are not set...).

SD works out of the box.

Trackpad is too fast..but I've managed to have it acceptable tweaking xorg.conf

I didn't used rEFIT, but I just placed the grub.efi in a folder (in sda1) /EFI/boot/ named as BOOTX64.efi. This way I can boot directly in the grub menu:

at boot just keep pressed the Option key, until the boot menu appears. Select EFI boot and you will have the grub menu.

At the next boot the default will be boot on grub menu..to boot OSX you will have to press option and select OSX disk (it will change OSX back as default also)..and so on...

Only thing I have trouble on suspend my mac... The Bluetooth have serious issue to pair when the b43 modules is loaded (however my magic mouse sometime works sometime not...have to restart  Bluetooth service manually or make some voodoo rite...).

I can't wait when I will have both radeon and intel working in the same kernel and able to switch.

I have a 3.2 rc6 with radeon to test Bluetooth/wifi coexistence but nothing changes. otherwise I use Intel (on 3.1.*)

good work!

my cflags:

CFLAGS="-O2 -march=corei7-avx -mtune=corei7-avx -pipe"

ps this laptop with gentoo (ops I have funtoo..however) is a sources eater... compiled webkit-gtk in 15 min vs core2-duo 2.4Ghz 1h and more.. yes I also have 8 cpu here!!!

I can even boot my old HD with my old macbook linux system via USB. (I put the old HD in a USB disk case). This might be useful for those that want to skip the partitionig of the main HD...using an external drive or a big USB stick.

----------

## alvinwu

Read recent updates from the very long thread:

http://ubuntuforums.org/showthread.php?t=1695746&page=80

I'm glad to say running vanilla-sources-3.2.1 fixes most of the needs for a mbp 8,2 machine.

So, I like to sum up the steps so anyone who own these machines enjoys running open sources software with power!

1. apply the i915 reverse patch to enable i915_lvds_channels works:

 *Quote:*   

> https://github.com/fooblahblah/linux-mainline-efi-lvds/blob/master/i915_reverse.patch

 

2. apply those patches for apple_bl, apple_gmux, radeon_bioe as usual, to simply patching work, you may download those patches: *Quote:*   

> www.eternalit.com/~alvin/download/3.2

 

OK, now it's time to make that workable as my best tool.

1. Compile those radeon, i915 drivers as modules

2. Use the kernel command parameter as a reference point

3. Modify grub.cfg, reference to the 3.2.1 modules, blacklist either modules that you don't want

 *Quote:*   

> 
> 
> menuentry 'GNU/Linux, with Linux x86_64-3.2.1 i915' --class gnu-linux --class gnu --class os {
> 
>         load_video
> ...

 

4. Create a igd-gpu program that switches the apple gpu gmux, contribute by:

 *Quote:*   

> http://ubuntuforums.org/showthread.php?t=1695746&page=27

 

5. Create some local scripts (my setup in /usr/local/sbin)

local-xorg -> to modify contents inside /etc/X11/xorg.d/ to tailor the behavior of xorg server pulling drivers, according to the kernel command line parameter

 *Quote:*   

> 
> 
> #!/bin/bash
> 
> #set -x
> ...

 

 *Quote:*   

> 
> 
> #!/bin/bash
> 
> r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
> ...

 

6. Create systemd.service units to control the operations

 *Quote:*   

> 
> 
> [Unit]
> 
> Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
> ...

 

7. It is very experimental, fine tunes are welcome

8, Suspend, resume under radeon is ok but not under i915

9. Most of the functions are working fine

Hope you enjoy, while under i915 environment, the machines works ~7 hours!

So, with a simple reboot, you can select external monitor support via radeon, or long battery life via i915.

Great works from ubuntu, gmae, archlinx,fedora, freedesktop,....experts!

BTW: suspend/resume under radeon working fine but not under i915

----------

## alvinwu

 *alvinwu wrote:*   

> Read recent updates from the very long thread:
> 
> http://ubuntuforums.org/showthread.php?t=1695746&page=80
> 
> I'm glad to say running vanilla-sources-3.2.1 fixes most of the needs for a mbp 8,2 machine.
> ...

 

----------

## alvinwu

Since I encounter occasional kernel panic while bootup with i915, I change a little bit about the setup to make it easier (not 100%) to boot successfully:

Add i915 (together with radeon) to the blacklist kernel command line if you want to boot with it:

 *Quote:*   

> 
> 
> linux   /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=i915,radeon real_init=/bin/systemd

 

Modify the service parm as:

 *Quote:*   

> 
> 
> [Unit]
> 
> Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
> ...

 

Replace /usr/local/sbin/local-xorg by the following script:

 *Quote:*   

> 
> 
> #!/bin/bash
> 
> #set -x
> ...

 

----------

## alvinwu

I change the service parm as below to make it more reliable:

 *Quote:*   

> 
> 
> [Unit]
> 
> Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
> ...

 

----------

## alvinwu

Upon recent update to systemd-43, I had to modify the custom unit file as below:

```

[Unit]

Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver

Before=graphical.target

[Service]

Type=oneshot

ExecStart=/usr/local/sbin/local-xorg

[Install]

WantedBy=multi-user.target

```

And I found previous script was a bit messy, I re-post:

```

#!/bin/bash

 

#set -x

r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"

cmdline=`dmesg|head|grep "Command line:"` 

mpbl=`echo "$cmdline" | sed -e 's@^.*modprobe.blacklist=@@'`

# exit when no modprobe.blacklist for radeon or i915 in the kernel command line

[[ "$cmdline" == "$mpbl" ]] && exit

mpbl=`echo "$mpbl" | sed -e 's@[ \t].*$@@'`

if [[ "$mpbl" =~ 'radeon' ]] && [[ "$mpbl" =~ 'i915' ]] ; then

        [[ -f $r_x_f ]] &&  rm $r_x_f

        /usr/local/sbin/igd-gpu

        # modprbe apple_bl

        modprobe i915 

        exit

else

        if [[ "$mpbl" =~ 'i915' ]] ; then

                [[ -f "$r_x_f" ]] && exit

                cat <<EOF> $r_x_f

Section "Device"

        Identifier   "Card0"

        Driver       "radeon"

        BusID        "1:0:0"

        Option       "ColorTiling"   "1"

        Option       "ForceLowPowerMode"     "1"

EndSection

EOF

        exit

        else

                if [[ "$mpbl" =~ 'radeon' ]] ; then

                        [[ -f $r_x_f ]] &&  rm $r_x_f

                        /usr/local/sbin/igd-gpu

                        exit

                fi

        fi

fi

exit

```

----------

## alvinwu

With recent updates, the mbp working properly including suspend (while running with the i915 driver)..etc.

update:

linux-3.5.0-rc2

choose the apple_gmux config under "x86 platform devices"

apply the "radeon bios patch"

modify/update the module parms for i915 & apple_bl

use some little scripts to manually change the value of /sys/class/backlight/gmux_backligt/brightness to adjust the brightness while running with the i915 display driver.

So I myself consider this case is solved.

----------

## brynstntn

Here is a python script that I wrote for xbindkeys.  This works for the radeon card in efi mode (I have not tested with intel).  Not sure if this makes a difference, but I've added acpi_backlight=vendor to the end of grub.

------------------------------------------------------------------------------

```
import os

import sys

class PyMac(object):

   brightness = '/sys/class/backlight/gmux_backlight/brightness'

   max_brightness = '/sys/class/backlight/gmux_backlight/max_brightness'

   actual_brightness = '/sys/class/backlight/gmux_backlight/brightness'

   increment = 5000

   def __init__(self, command):

      if command == "1":

         self.brightnessUp()

      elif command == "0":

         self.brightnessDown()

   def brightnessDown(self):

      currentBrightness = int(open(self.actual_brightness, "r").read().strip())

      newBrightness = currentBrightness - self.increment

      if (newBrightness >= 0):

         os.system("echo " + str(newBrightness) + " > " + self.brightness)

      else:

         os.system("echo 0 > " + self.brightness)

      

   def brightnessUp(self):

      currentBrightness = int(open(self.actual_brightness, "r").read().strip())

      newBrightness = currentBrightness + self.increment

      if (newBrightness < self.max_brightness):

         os.system("echo " + str(currentBrightness + self.increment) + " > " + self.brightness)

      else:

         os.system("echo " + str(self.max_brightness) + " > " + self.brightness)

      

a = PyMac(sys.argv[1])
```

------------------------------

here is my xbindkeys config file

------------------------------------

```
"python /home/matthew/pyMac/pyMac.py 1"

  m:0x0 + c:68

"python /home/matthew/pyMac/pyMac.py 0"

  m:0x0 + c:67
```

----------

