aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/spi.c
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2011-03-01 08:14:42 -0500
committerLuciano Coelho <coelho@ti.com>2011-03-03 09:10:46 -0500
commit2da69b890f47852dc368136375f49a5d24e2d9a1 (patch)
tree26b1eb15974b8e935e285523de39f683e4ad0e0b /drivers/net/wireless/wl12xx/spi.c
parenta620865edf62ea2d024bbfe62162244473badfcb (diff)
wl12xx: Switch to level trigger interrupts
The interrupt of the wl12xx is a level interrupt in nature, since the interrupt line is not auto-reset. However, since resetting the interrupt requires bus transactions, this cannot be done from an interrupt context. Thus, requesting a level interrupt would require to disable the irq and re-enable it after the HW is acknowledged. Since we now request a threaded irq, this can also be done by specifying the IRQF_ONESHOT flag. Triggering on an edge can be problematic in some platforms, if the sampling frequency is not sufficient for detecting very frequent interrupts. In case an interrupt is missed, the driver will hang as the interrupt line will stay high until it is acknowledged by the driver, which will never happen. Fix this by requesting a level triggered interrupt, with the IRQF_ONESHOT flag. Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/spi.c')
-rw-r--r--drivers/net/wireless/wl12xx/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
index df5a00f103ea..18cf01719ae0 100644
--- a/drivers/net/wireless/wl12xx/spi.c
+++ b/drivers/net/wireless/wl12xx/spi.c
@@ -409,7 +409,7 @@ static int __devinit wl1271_probe(struct spi_device *spi)
409 } 409 }
410 410
411 ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, 411 ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq,
412 IRQF_TRIGGER_RISING, 412 IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
413 DRIVER_NAME, wl); 413 DRIVER_NAME, wl);
414 if (ret < 0) { 414 if (ret < 0) {
415 wl1271_error("request_irq() failed: %d", ret); 415 wl1271_error("request_irq() failed: %d", ret);