netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC/T: Possible fix for bcm43xx periodic work bug
@ 2006-09-07 18:17 Larry Finger
       [not found] ` <45006221.4090603-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  2006-09-08  9:42 ` Erik Mouw
  0 siblings, 2 replies; 10+ messages in thread
From: Larry Finger @ 2006-09-07 18:17 UTC (permalink / raw)
  To: netdev; +Cc: Bcm43xx-dev, Michael Buesch, Stefano Brivio

Hi all,

I think I have a fix for the bcm43xx bug that leads to NETDEV WATCHDOG tx timeouts and would like it
to get as much testing as possible as this bug affects V2.6.18-rcX. If the problem is truly
fixed, I hope to get the fix into mainline before release of the bug into the stable series.

I got the idea for the fix when I discovered that the timeout interval used for the watchdog is the 
default value of 5 seconds. Obviously, the few milliseconds used in the periodic work handler 
weren't causing us to "just miss".

To exacerbate the problem, I changed the repeat timer for periodic work from 15 to 1 sec. I also set 
BADNESS_LIMIT to 0. As a result, I was running the problem code once per second instead of once per 
minute. Now failures would occur in minutes instead of hours.

Operating from the premise that the DMA needed some time to reach the idle state after the MAC was 
suspended, I tried various delays, but nothing worked.

Then I decided to test the premise that the problem was associated with shutting down and restarting 
the network. That lead to the current patch, which has run for what is effectively 100 times longer 
than previous versions.

Larry
-------------------------------------------------------------------


Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3244,8 +3244,6 @@ static void bcm43xx_periodic_work_handle
  		 * be preemtible.
  		 */
  		mutex_lock(&bcm->mutex);
-		netif_stop_queue(bcm->net_dev);
-		synchronize_net();
  		spin_lock_irqsave(&bcm->irq_lock, flags);
  		bcm43xx_mac_suspend(bcm);
  		if (bcm43xx_using_pio(bcm))
@@ -3270,7 +3268,6 @@ static void bcm43xx_periodic_work_handle
  		if (bcm43xx_using_pio(bcm))
  			bcm43xx_pio_thaw_txqueues(bcm);
  		bcm43xx_mac_enable(bcm);
-		netif_wake_queue(bcm->net_dev);
  	}
  	mmiowb();
  	spin_unlock_irqrestore(&bcm->irq_lock, flags);



----------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-09-11 14:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 18:17 RFC/T: Possible fix for bcm43xx periodic work bug Larry Finger
     [not found] ` <45006221.4090603-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-07 20:39   ` Michael Buesch
     [not found]     ` <200609072239.20074.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2006-09-07 22:08       ` Larry Finger
     [not found]     ` <45016F63.9000200@lwfinger.net>
     [not found]       ` <45016F63.9000200-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-08 20:42         ` Michael Buesch
2006-09-08  9:42 ` Erik Mouw
2006-09-08  9:45   ` Michael Buesch
2006-09-08 13:23     ` Erik Mouw
     [not found]       ` <20060908132317.GS26916-7jKlSzr1t1+rFW3l5+5NieqUGfbH9hYC@public.gmane.org>
2006-09-08 13:36         ` Larry Finger
     [not found]           ` <450171E4.8070901-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-11 10:52             ` Erik Mouw
     [not found]               ` <20060911105202.GA7903-7jKlSzr1t1+rFW3l5+5NieqUGfbH9hYC@public.gmane.org>
2006-09-11 14:37                 ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).