Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-27 Thread Larry Finger
Hi,

In the latest Broadcom driver, I found code that sets the timeout field of the
SSB configuration for some BCM4311 and all BCM4312 devices. Please test this
patch following a cold boot.

Thanks,

Larry



Index: wireless-testing/drivers/ssb/driver_pcicore.c
===
--- wireless-testing.orig/drivers/ssb/driver_pcicore.c
+++ wireless-testing/drivers/ssb/driver_pcicore.c
@@ -621,6 +621,14 @@ int ssb_pcicore_dev_irqvecs_enable(struc
tmp |= 0x40;
ssb_pcie_write(pc, 0x100, tmp);
}
+   if (bus->chip_id == 0x4312 ||
+  (bus->chip_id == 0x4311 && bus->chip_rev == 2)) {
+   tmp = ssb_read32(pdev, SSB_IMCFGLO);
+   tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO_SHIFT);
+   tmp |= 3;
+   ssb_write32(pdev, SSB_IMCFGLO, tmp);
+   ssb_commit_settings(bus);
+   }
}
pc->setup_done = 1;
 out:
Index: wireless-testing/drivers/ssb/driver_chipcommon_pmu.c
===
--- wireless-testing.orig/drivers/ssb/driver_chipcommon_pmu.c
+++ wireless-testing/drivers/ssb/driver_chipcommon_pmu.c
@@ -424,9 +424,9 @@ static void ssb_pmu_resources_init(struc
switch (bus->chip_id) {
case 0x4312:
/* We keep the default settings:
-* min_msk = 0xCBB
 * max_msk = 0x7
 */
+   min_msk = 0xCBB;
break;
case 0x4325:
/* Power OTP down later. */
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: BCM4312 disconnects on 2.6.32

2009-12-27 Thread Yuval Hager
On Saturday 26 December 2009, Gábor Stefanik wrote:
> Update your pci.ids file - what you have is a BCM4311/02 ABG.
> 

I ran update-pciids successfully, now dmesg says:
b43-phy0: Broadcom 4311 WLAN found (core revision 13)

and lspci:
02:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11a/b/g 
[14e4:4312] (rev 02)

> Also, could you check a few more kernels in-between .29 and .32?
> 

I have checked the following kernels, and found they all work correctly:
2.6.29
2.6.29.6
2.6.30.4
2.6.31.9

Kernels 2.6.32 and 2.6.32.2 experience the disconnection I mentioned in the 
original post. Before checking 2.6.32, I have removed /lib/firmware/b43 
completely and installed the firmware based on the detailed instructions on 
the web site. I also enabled CONFIG_B43_PHY_LP=y for 2.6.32.

all kernels checked are vanilla kernels, from kernel.org.

--y

> On Sat, Dec 26, 2009 at 8:01 PM,   wrote:
> > Hi,
> >
> > First, some adminstrativa..
> >
> > $ uname -srvmip
> > Linux 2.6.29 #4 Fri Aug 28 13:17:05 IDT 2009 i686 VIA C7-M Processor
> > 1600MHz CentaurHauls
> >
> > $ lspci -vnn |grep 14e4
> > 02:00.0 Network controller [0280]: Broadcom Corporation BCM4312
> > 802.11a/b/g [14e4:4312] (rev 02) 07:03.0 Ethernet controller [0200]:
> > Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet [14e4:169c]
> > (rev 03)
> >
> > $ dmesg|grep b43-phy | head -1
> > [7.461364] b43-phy0: Broadcom 4311 WLAN found
> >
> > This same machine works fine when I use the 2.6.29 kernel, but when I
> > use 2.6.32, I get "Carrier lost" disconnection after a couple of
> > minutes (exact times vary between 30 seconds to about 2-3 minutes).
> >
> > Before filling everyone's inbox with large kernel logs, here's a
> > snippet from dmesg:
> > # dmesg | egrep  "b43|wlan|AP"
> > [0.00] ACPI: APIC 6feb0390 00060 (v02 HP APIC2203 20080820
> > MSFT 0097) [0.00]   #5 [008000 - 00f000]
> >  BOOTMAP ==> [008000 - 00f000] [0.121705] ACPI: Power
> > Resource [APMF] (off)
> > [4.608781] b43-pci-bridge :02:00.0: PCI INT A -> Link[LNKH] ->
> > GSI 10 (level, low) -> IRQ 10 [4.608809] b43-pci-bridge
> > :02:00.0: setting latency timer to 64 [4.807626] b43-phy0:
> > Broadcom 4311 WLAN found (core revision 13) [4.900090] b43-phy0
> > debug: Found PHY: Analog 4, Type 2, Revision 9 [4.900120] b43-phy0
> > debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2 [  
> >  4.960151] b43-phy0 debug: DebugFS (CONFIG_DEBUG_FS) not enabled in
> > kernel config [4.966071] Registered led device: b43-phy0::tx
> > [4.966125] Registered led device: b43-phy0::rx
> > [4.966179] Registered led device: b43-phy0::radio
> > [5.048461] fuse init (API version 7.13)
> > [   34.990139] b43 ssb0:0: firmware: requesting b43/ucode13.fw
> > [   35.080855] b43 ssb0:0: firmware: requesting b43/b0g0initvals13.fw
> > [   35.250092] b43-phy0: Loading firmware version 478.104 (2008-07-01
> > 00:50:23) [   35.360376] b43-phy0 debug: Chip initialized
> > [   35.360441] b43-pci-bridge :02:00.0: PCI: Disallowing DAC for
> > device [   35.360452] b43-phy0: DMA mask fallback from 64-bit to 32-bit
> > [   35.360809] b43-phy0 debug: 64-bit DMA initialized
> > [   35.360893] b43-phy0 debug: QoS enabled
> > [   35.400721] b43-phy0 debug: Wireless interface started
> > [   35.400741] b43-phy0 debug: Adding Interface type 2
> > [   45.267169] b43-phy0 debug: Removing Interface type 2
> > [   45.267283] b43-phy0 debug: Wireless interface stopped
> > [   45.267295] b43-phy0 debug: DMA-64 rx_ring: Used slots 1/64, Failed
> > frames 0/0 = 0.0%, Average tries 0.00 [   45.267421] b43-phy0 debug:
> > DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%,
> > Average tries 0.00 [   45.280097] b43-phy0 debug: DMA-64 tx_ring_AC_BE:
> > Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00 [  
> > 45.300151] b43-phy0 debug: DMA-64 tx_ring_AC_VI: Used slots 0/256,
> > Failed frames 0/0 = 0.0%, Average tries 0.00 [   45.320064] b43-phy0
> > debug: DMA-64 tx_ring_AC_VO: Used slots 2/256, Failed frames 0/22 =
> > 0.0%, Average tries 1.00 [   45.340060] b43-phy0 debug: DMA-64
> > tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average
> > tries 0.00 [   45.620280] b43-phy0: Loading firmware version 478.104
> > (2008-07-01 00:50:23) [   45.730312] b43-phy0 debug: Chip initialized
> > [   45.730374] b43-pci-bridge :02:00.0: PCI: Disallowing DAC for
> > device [   45.730383] b43-phy0: DMA mask fallback from 64-bit to 32-bit
> > [   45.730623] b43-phy0 debug: 64-bit DMA initialized
> > [   45.730703] b43-phy0 debug: QoS enabled
> > [   45.770718] b43-phy0 debug: Wireless interface started
> > [   45.770732] b43-phy0 debug: Adding Interface type 2
> > [   45.858474] wlan0: direct probe to AP 00:22:3f:18:89:5e (try 1)
> > [   45.860542] wlan0: direct probe responded
> > [   45.860551] wlan0: authenticate with AP 00:22:3f:18:89:5e (try 1)
> > [   45.862212] wlan0: authenticated