netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix for system lockups in 2.6.18-rcX caused by bcm43xx
@ 2006-09-09  1:47 Larry Finger
       [not found] ` <45021D4A.6040805-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Larry Finger @ 2006-09-09  1:47 UTC (permalink / raw)
  To: John Linville; +Cc: netdev, Michael Buesch, Stefano Brivio, Broadcom Linux

John,

PLease send this upstream for inclusion in 2.6.18, if possible. This patch will not work for
wireless-2.6. That patch will be sent to you soon.

Larry

=============================================


This patch fixes a bug in the bcm43xx driver in 2.6.18-rcX that hangs the machine due to improper
locking. Between 2.6.17 and .18, longer portions of certain periodic work were made preemptible to
improve latency, which is how this bug was introduced. It happens relatively infrequently - every 6
- 10 hours, but when it does, the power button is the only possible recovery.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>

==================================


Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3182,19 +3182,21 @@ static void bcm43xx_periodic_work_handle
  		/* Periodic work will take a long time, so we want it to
  		 * be preemtible.
  		 */
-		bcm43xx_lock_irqonly(bcm, flags);
+		bcm43xx_lock_noirq(bcm);
  		netif_stop_queue(bcm->net_dev);
+		bcm43xx_lock_irqonly(bcm, flags);
+		bcm43xx_mac_suspend(bcm);
  		if (bcm43xx_using_pio(bcm))
  			bcm43xx_pio_freeze_txqueues(bcm);
  		savedirqs = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
  		bcm43xx_unlock_irqonly(bcm, flags);
-		bcm43xx_lock_noirq(bcm);
  		bcm43xx_synchronize_irq(bcm);
  	} else {
  		/* Periodic work should take short time, so we want low
  		 * locking overhead.
  		 */
-		bcm43xx_lock_irqsafe(bcm, flags);
+		bcm43xx_lock_noirq(bcm);
+		bcm43xx_lock_irqonly(bcm, flags);
  	}

  	do_periodic_work(bcm);
@@ -3206,6 +3208,7 @@ static void bcm43xx_periodic_work_handle
  			bcm43xx_interrupt_enable(bcm, savedirqs);
  			if (bcm43xx_using_pio(bcm))
  				bcm43xx_pio_thaw_txqueues(bcm);
+			bcm43xx_mac_enable(bcm);
  		}
  		netif_wake_queue(bcm->net_dev);
  		mmiowb();
@@ -3213,7 +3216,8 @@ static void bcm43xx_periodic_work_handle
  		bcm43xx_unlock_noirq(bcm);
  	} else {
  		mmiowb();
-		bcm43xx_unlock_irqsafe(bcm, flags);
+		bcm43xx_unlock_irqonly(bcm, flags);
+		bcm43xx_unlock_noirq(bcm);
  	}
  }



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

end of thread, other threads:[~2006-10-06  6:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-09  1:47 [PATCH] fix for system lockups in 2.6.18-rcX caused by bcm43xx Larry Finger
     [not found] ` <45021D4A.6040805-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-09 15:23   ` John W. Linville
2006-09-09 16:04     ` Larry Finger
     [not found]       ` <4502E62B.5060601-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-09 19:42         ` Daniel Drake
2006-09-11 19:28         ` John W. Linville
2006-09-11 19:59           ` Larry Finger
     [not found]             ` <4505C005.2070302-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-11 20:35               ` John W. Linville
2006-09-11 22:04                 ` Jeff Garzik
2006-09-14  8:25                   ` Jarek Poplawski
2006-09-14  8:29                     ` Jarek Poplawski
2006-10-05 20:52                       ` Randy Dunlap
2006-10-06  5:57                         ` Jarek Poplawski
2006-10-06  6:19                           ` Jarek Poplawski
2006-10-06  6:57                           ` Jarek Poplawski

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).