diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2013-08-28 00:29:46 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-09-09 18:40:53 (GMT) |
commit | aec8e88c947b7017e2b4bbcb68a4bfc4a1f8ad35 (patch) | |
tree | 584e2a99402483e16d6145bdf1d29416a1a0abce /drivers/net/wireless/cw1200/fwio.c | |
parent | e7d33bb5ea82922e6ddcfc6b28a630b1a4ced071 (diff) | |
download | linux-aec8e88c947b7017e2b4bbcb68a4bfc4a1f8ad35.tar.xz |
cw1200: Don't perform SPI transfers in interrupt context
When we get an interrupt from the hardware, the first thing the driver does
is tell the device to mask off the interrupt line. Unfortunately this
involves a SPI transaction in interrupt context. Some (most?) SPI
controllers perform the transfer asynchronously and try to sleep.
This is bad, and triggers a BUG().
So, work around this by using adding a hwbus hook for the cw1200 driver
core to call. The cw1200_spi driver translates this into
irq_disable()/irq_enable() calls instead, which can safely be called in
interrupt context.
Apparently the platforms I used to develop the cw1200_spi driver used
synchronous spi_sync() implementations, which is why this didn't surface
until now.
Many thanks to Dave Sizeburns for the inital bug report and his services
as a tester.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/cw1200/fwio.c')
-rw-r--r-- | drivers/net/wireless/cw1200/fwio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/cw1200/fwio.c b/drivers/net/wireless/cw1200/fwio.c index acdff0f..0b2061b 100644 --- a/drivers/net/wireless/cw1200/fwio.c +++ b/drivers/net/wireless/cw1200/fwio.c @@ -485,7 +485,7 @@ int cw1200_load_firmware(struct cw1200_common *priv) /* Enable interrupt signalling */ priv->hwbus_ops->lock(priv->hwbus_priv); - ret = __cw1200_irq_enable(priv, 1); + ret = __cw1200_irq_enable(priv, 2); priv->hwbus_ops->unlock(priv->hwbus_priv); if (ret < 0) goto unsubscribe; |