From: Larry Finger <Larry.Finger@lwfinger.net>
To: John Linville <linville@tuxdriver.com>
Cc: netdev@vger.kernel.org, Michael Buesch <mb@bu3sch.de>,
Stefano Brivio <st3@riseup.net>,
Broadcom Linux <bcm43xx-dev@lists.berlios.de>
Subject: [PATCH] fix for system lockups in 2.6.18-rcX caused by bcm43xx
Date: Fri, 08 Sep 2006 20:47:54 -0500 [thread overview]
Message-ID: <45021D4A.6040805@lwfinger.net> (raw)
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);
}
}
next reply other threads:[~2006-09-09 1:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-09 1:47 Larry Finger [this message]
[not found] ` <45021D4A.6040805-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-09-09 15:23 ` [PATCH] fix for system lockups in 2.6.18-rcX caused by bcm43xx 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45021D4A.6040805@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
--cc=st3@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.