From: Michael Buesch <mb@bu3sch.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Broadcom Wireless <bcm43xx-dev@lists.berlios.de>,
"linux-wireless" <linux-wireless@vger.kernel.org>,
Albert Herranz <albert_herranz@yahoo.es>
Subject: [PATCH] b43: Fix SDIO interrupt handler deadlock
Date: Fri, 11 Sep 2009 16:00:19 +0200 [thread overview]
Message-ID: <200909111600.20786.mb@bu3sch.de> (raw)
We need to release the SDIO host before locking the driver mutex.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c 2009-09-10 20:26:43.000000000 +0200
+++ wireless-testing/drivers/net/wireless/b43/main.c 2009-09-11 15:55:19.000000000 +0200
@@ -1914,20 +1914,14 @@ static irqreturn_t b43_interrupt_handler
static void b43_sdio_interrupt_handler(struct b43_wldev *dev)
{
struct b43_wl *wl = dev->wl;
- struct sdio_func *func = dev->dev->bus->host_sdio;
irqreturn_t ret;
- if (unlikely(b43_status(dev) < B43_STAT_STARTED))
- return;
-
mutex_lock(&wl->mutex);
- sdio_release_host(func);
ret = b43_do_interrupt(dev);
if (ret == IRQ_WAKE_THREAD)
b43_do_interrupt_thread(dev);
- sdio_claim_host(func);
mutex_unlock(&wl->mutex);
}
Index: wireless-testing/drivers/net/wireless/b43/sdio.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/sdio.c 2009-09-10 19:23:20.000000000 +0200
+++ wireless-testing/drivers/net/wireless/b43/sdio.c 2009-09-11 15:54:05.000000000 +0200
@@ -54,7 +54,12 @@ static void b43_sdio_interrupt_dispatche
struct b43_sdio *sdio = sdio_get_drvdata(func);
struct b43_wldev *dev = sdio->irq_handler_opaque;
+ if (unlikely(b43_status(dev) < B43_STAT_STARTED))
+ return;
+
+ sdio_release_host(func);
sdio->irq_handler(dev);
+ sdio_claim_host(func);
}
int b43_sdio_request_irq(struct b43_wldev *dev,
--
Greetings, Michael.
reply other threads:[~2009-09-11 14:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200909111600.20786.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=albert_herranz@yahoo.es \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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.