Re: 14e4:4315 DMA Errors (still)

2009-10-05 Thread Gábor Stefanik
On Fri, Oct 2, 2009 at 11:04 PM,   wrote:
>
> Hi Folks --
>
> I've read in the archives about DMA errors with the LP-PHY, but there didn't
> seem to be any conclusion.  Any guidance on what I can test to get it working?
> It's reproducable on my Lenovo G530 laptop.  (Yes, I know forcing PIO works 
> for
> others, and it works for me too, but I'd like to help testing if I can).
>
> Any guidance on which tests would be most likely to work?  AFAIK, options to
> test include:
> * 64bit kernel (and userland?)
> * Hack b43/dma.c to force fallback to 32bit DMA (as a trial datapoint only)

Won't work - LP-PHY only supports 64bit DMA.

> * Boot with Mem=2G.  Currently 4G ram is installed.
> * Firmware 5xx
>
> Or is this a HW design error in the laptop, and I should just live with 
> forcing PIO?
>
> My system details:
> * Compat-wireless-2009-09-30 (and also back to 9-21)
> * Fedora Rawhide 32-bit, kernel 2.6.31.1-56.fc12.i686
> * Firmware 478.104
> * Fatal DMA error soon after heavy traffic starts
>

Try installing a proper wireless-testing kernel (not just
compat-wireless). This issue seems to specifically affect
2.6.31+compat-wireless users (probably something needs to be
backported). 2.6.32-rc1+compat-wireless shoud also work.

> dmesg extract:
>
> ssb: Sonics Silicon Backplane found on PCI device :04:00.0
> b43-phy0: Broadcom 4312 WLAN found (core revision 15)
> b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1
> b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2
> phy0: Selected rate control algorithm 'minstrel'
> Registered led device: b43-phy0::tx
> Registered led device: b43-phy0::rx
> Registered led device: b43-phy0::radio
> Broadcom 43xx driver loaded [ Features: PML, Firmware-ID: FW13 ]
> b43 ssb0:0: firmware: requesting b43/ucode15.fw
> cfg80211: Calling CRDA for country: US
> cfg80211: Regulatory domain changed to country: US
>        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
>        (2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2700 mBm)
>        (517 KHz - 525 KHz @ 4 KHz), (300 mBi, 1700 mBm)
>        (525 KHz - 533 KHz @ 4 KHz), (300 mBi, 2000 mBm)
>        (549 KHz - 571 KHz @ 4 KHz), (300 mBi, 2000 mBm)
>        (5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 3000 mBm)
> b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw
> b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw
> b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
> b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz.
> b43-phy0 debug: RC calib: Failed to switch to channel 7, error = -5
> b43-phy0 debug: Chip initialized
> b43-phy0 debug: 64-bit DMA initialized
> b43-phy0 debug: QoS enabled
> b43-phy0 debug: Wireless interface started
> b43-phy0 debug: Adding Interface type 2
> ADDRCONF(NETDEV_UP): wlan0: link is not ready
> wlan0: deauthenticating from 00:0c:41:e2:f9:81 by local choice (reason=3)
> wlan0: direct probe to AP 00:0c:41:e2:f9:81 (try 1)
> wlan0: direct probe responded
> wlan0: authenticate with AP 00:0c:41:e2:f9:81 (try 1)
> wlan0: authenticated
> wlan0: associate with AP 00:0c:41:e2:f9:81 (try 1)
> wlan0: RX AssocResp from 00:0c:41:e2:f9:81 (capab=0x411 status=0 aid=2)
> wlan0: associated
> ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac:
> ff:ff:ff:ff:ff:ff
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> NOHZ: local_softirq_pending 08
> wlan0: no IPv6 routers present
> CE: hpet increasing min_delta_ns to 15000 nsec
> b43-phy0 ERROR: Fatal DMA error: 0x, 0x0400, 0x, 
> 0x,
> 0x, 0x
> b43-phy0: Controller RESET (DMA error) ...
> b43-phy0 debug: Wireless interface stopped
> b43-phy0 debug: DMA-64 rx_ring: Used slots 8/64, Failed frames 0/0 = 0.0%,
> Average tries 0.00
> b43-phy0 debug: DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 =
> 0.0%, Average tries 0.00
> b43-phy0 debug: DMA-64 tx_ring_AC_BE: Used slots 256/256, Failed frames 
> 0/7742 =
> 0.0%, Average tries 1.37
> b43-phy0 debug: DMA-64 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 =
> 0.0%, Average tries 0.00
> b43-phy0 debug: DMA-64 tx_ring_AC_VO: Used slots 2/256, Failed frames 0/555 =
> 0.0%, Average tries 1.01
> b43-phy0 debug: DMA-64 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 =
> 0.0%, Average tries 0.00
> b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
> b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz.
> b43-phy0 debug: Chip initialized
> b43-phy0 debug: 64-bit DMA initialized
> b43-phy0 debug: QoS enabled
> b43-phy0 debug: Wireless interface started
> b43-phy0: Controller restarted
> b43-phy0 ERROR: Fatal DMA error: 0x04

[PATCH] b43: Protect sanity check against physical device removal

2009-10-05 Thread Michael Buesch
Fix IRQ mask sanity check for physically pulled device.

Tested-by: Andrew Price 
Signed-off-by: Michael Buesch 

---
 drivers/net/wireless/b43/main.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -3874,6 +3874,7 @@ static struct b43_wldev * b43_wireless_c
 {
struct b43_wl *wl = dev->wl;
struct b43_wldev *orig_dev;
+   u32 mask;
 
 redo:
if (!dev || b43_status(dev) < B43_STAT_STARTED)
@@ -3920,7 +3921,8 @@ redo:
goto redo;
return dev;
}
-   B43_WARN_ON(b43_read32(dev, B43_MMIO_GEN_IRQ_MASK));
+   mask = b43_read32(dev, B43_MMIO_GEN_IRQ_MASK);
+   B43_WARN_ON(mask != 0x && mask);
 
/* Drain the TX queue */
while (skb_queue_len(&wl->tx_queue))

-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [RFC/RFT] b43: Fix PPC crash in rfkill polling on unload

2009-10-05 Thread Michael Buesch
On Friday 02 October 2009 19:54:34 Larry Finger wrote:
> In Bugzilla No. 14181, a PowerMac G4 crashes on ifdown or
> module unload because the rfkill polling has not been stopped.
> For the x86 architectures, the attempt to reach a now unmapped
> register is not fatal as it is on PPC.
> 
> Signed-off-by: Larry Finger 
> ---
> 
> Michael,
> 
> Does this look right?

I don't know how rfkill works, so I can't tell.

> 
> Larry
> ---
> 
> Index: wireless-testing/drivers/net/wireless/b43/main.c
> ===
> --- wireless-testing.orig/drivers/net/wireless/b43/main.c
> +++ wireless-testing/drivers/net/wireless/b43/main.c
> @@ -4500,6 +4500,7 @@ static void b43_op_stop(struct ieee80211
>   cancel_work_sync(&(wl->beacon_update_trigger));
>  
>   mutex_lock(&wl->mutex);
> + wiphy_rfkill_stop_polling(hw->wiphy);
>   if (b43_status(dev) >= B43_STAT_STARTED) {
>   dev = b43_wireless_core_stop(dev);
>   if (!dev)
> 
> 



-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


14e4:4315 DMA Errors (still)

2009-10-05 Thread fred99

Hi Folks -- 
 
I've read in the archives about DMA errors with the LP-PHY, but there didn't 
seem to be any conclusion.  Any guidance on what I can test to get it working?  
It's reproducable on my Lenovo G530 laptop.  (Yes, I know forcing PIO works for 
others, and it works for me too, but I'd like to help testing if I can). 
 
Any guidance on which tests would be most likely to work?  AFAIK, options to 
test include: 
* 64bit kernel (and userland?) 
* Hack b43/dma.c to force fallback to 32bit DMA (as a trial datapoint only) 
* Boot with Mem=2G.  Currently 4G ram is installed. 
* Firmware 5xx 

Or is this a HW design error in the laptop, and I should just live with forcing 
PIO?
 
My system details: 
* Compat-wireless-2009-09-30 (and also back to 9-21) 
* Fedora Rawhide 32-bit, kernel 2.6.31.1-56.fc12.i686 
* Firmware 478.104 
* Fatal DMA error soon after heavy traffic starts 
 
dmesg extract: 
 
ssb: Sonics Silicon Backplane found on PCI device :04:00.0 
b43-phy0: Broadcom 4312 WLAN found (core revision 15) 
b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1 
b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2 
phy0: Selected rate control algorithm 'minstrel' 
Registered led device: b43-phy0::tx 
Registered led device: b43-phy0::rx 
Registered led device: b43-phy0::radio 
Broadcom 43xx driver loaded [ Features: PML, Firmware-ID: FW13 ] 
b43 ssb0:0: firmware: requesting b43/ucode15.fw 
cfg80211: Calling CRDA for country: US 
cfg80211: Regulatory domain changed to country: US 
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) 
(2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2700 mBm) 
(517 KHz - 525 KHz @ 4 KHz), (300 mBi, 1700 mBm) 
(525 KHz - 533 KHz @ 4 KHz), (300 mBi, 2000 mBm) 
(549 KHz - 571 KHz @ 4 KHz), (300 mBi, 2000 mBm) 
(5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 3000 mBm) 
b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw 
b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw 
b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23) 
b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz. 
b43-phy0 debug: RC calib: Failed to switch to channel 7, error = -5 
b43-phy0 debug: Chip initialized 
b43-phy0 debug: 64-bit DMA initialized 
b43-phy0 debug: QoS enabled 
b43-phy0 debug: Wireless interface started 
b43-phy0 debug: Adding Interface type 2 
ADDRCONF(NETDEV_UP): wlan0: link is not ready 
wlan0: deauthenticating from 00:0c:41:e2:f9:81 by local choice (reason=3) 
wlan0: direct probe to AP 00:0c:41:e2:f9:81 (try 1) 
wlan0: direct probe responded 
wlan0: authenticate with AP 00:0c:41:e2:f9:81 (try 1) 
wlan0: authenticated 
wlan0: associate with AP 00:0c:41:e2:f9:81 (try 1) 
wlan0: RX AssocResp from 00:0c:41:e2:f9:81 (capab=0x411 status=0 aid=2) 
wlan0: associated 
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready 
b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac: 
ff:ff:ff:ff:ff:ff 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
NOHZ: local_softirq_pending 08 
wlan0: no IPv6 routers present 
CE: hpet increasing min_delta_ns to 15000 nsec 
b43-phy0 ERROR: Fatal DMA error: 0x, 0x0400, 0x, 
0x, 
0x, 0x 
b43-phy0: Controller RESET (DMA error) ... 
b43-phy0 debug: Wireless interface stopped 
b43-phy0 debug: DMA-64 rx_ring: Used slots 8/64, Failed frames 0/0 = 0.0%, 
Average tries 0.00 
b43-phy0 debug: DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 
0.0%, Average tries 0.00 
b43-phy0 debug: DMA-64 tx_ring_AC_BE: Used slots 256/256, Failed frames 0/7742 
= 
0.0%, Average tries 1.37 
b43-phy0 debug: DMA-64 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 
0.0%, Average tries 0.00 
b43-phy0 debug: DMA-64 tx_ring_AC_VO: Used slots 2/256, Failed frames 0/555 = 
0.0%, Average tries 1.01 
b43-phy0 debug: DMA-64 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 
0.0%, Average tries 0.00 
b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23) 
b43-phy0 debug: b2062: Using crystal tab entry 19200 kHz. 
b43-phy0 debug: Chip initialized 
b43-phy0 debug: 64-bit DMA initialized 
b43-phy0 debug: QoS enabled 
b43-phy0 debug: Wireless interface started 
b43-phy0: Controller restarted 
b43-phy0 ERROR: Fatal DMA error: 0x0400, 0x, 0x, 
0x, 
0x, 0x 
b43-phy0: Controller RESET (DMA error) ... 
b43-phy0 debug: Wireless interface stopped 
b43-phy0 debug: DMA-64 rx_ring: Used slots 0/64, Failed frames 0/0 = 0.0%, 
Average tries 0.00 
b43-phy0 debug: DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 
0.0%, Average tries 0.00 
b43-phy0 debug: DMA-64 tx_ring_AC_BE: Used slots 1/256, Failed frames 0/

[RFC/RFT] b43: Fix PPC crash in rfkill polling on unload

2009-10-05 Thread Larry Finger
In Bugzilla No. 14181, a PowerMac G4 crashes on ifdown or
module unload because the rfkill polling has not been stopped.
For the x86 architectures, the attempt to reach a now unmapped
register is not fatal as it is on PPC.

Signed-off-by: Larry Finger 
---

Michael,

Does this look right?

Larry
---

Index: wireless-testing/drivers/net/wireless/b43/main.c
===
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -4500,6 +4500,7 @@ static void b43_op_stop(struct ieee80211
cancel_work_sync(&(wl->beacon_update_trigger));
 
mutex_lock(&wl->mutex);
+   wiphy_rfkill_stop_polling(hw->wiphy);
if (b43_status(dev) >= B43_STAT_STARTED) {
dev = b43_wireless_core_stop(dev);
if (!dev)
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev