diff options
author | Chuck Ebbert <cebbert@redhat.com> | 2008-06-12 18:21:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-12 21:05:41 -0400 |
commit | cef33400d0349fb24b6f8b7dea79b66e3144fd8b (patch) | |
tree | 351e9da9d6805393e011f873b14a9100ebc7c741 /drivers/mmc | |
parent | 30ec261e5f97986644c0982543bc1cee1b2782bf (diff) |
mmc: wbsd: initialize tasklets before requesting interrupt
With CONFIG_DEBUG_SHIRQ set we will get an interrupt as soon as we
allocate one. Tasklets may be scheduled in the interrupt handler but they
will be initialized after the handler returns, causing a BUG() in
kernel/softirq.c when they run.
Should fix this Fedora bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=449817
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/wbsd.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index be624a049c67..c303e7f57ab4 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
@@ -1457,17 +1457,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
1457 | int ret; | 1457 | int ret; |
1458 | 1458 | ||
1459 | /* | 1459 | /* |
1460 | * Allocate interrupt. | 1460 | * Set up tasklets. Must be done before requesting interrupt. |
1461 | */ | ||
1462 | |||
1463 | ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); | ||
1464 | if (ret) | ||
1465 | return ret; | ||
1466 | |||
1467 | host->irq = irq; | ||
1468 | |||
1469 | /* | ||
1470 | * Set up tasklets. | ||
1471 | */ | 1461 | */ |
1472 | tasklet_init(&host->card_tasklet, wbsd_tasklet_card, | 1462 | tasklet_init(&host->card_tasklet, wbsd_tasklet_card, |
1473 | (unsigned long)host); | 1463 | (unsigned long)host); |
@@ -1480,6 +1470,15 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
1480 | tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, | 1470 | tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, |
1481 | (unsigned long)host); | 1471 | (unsigned long)host); |
1482 | 1472 | ||
1473 | /* | ||
1474 | * Allocate interrupt. | ||
1475 | */ | ||
1476 | ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); | ||
1477 | if (ret) | ||
1478 | return ret; | ||
1479 | |||
1480 | host->irq = irq; | ||
1481 | |||
1483 | return 0; | 1482 | return 0; |
1484 | } | 1483 | } |
1485 | 1484 | ||