diff options
author | Harry Hong <hhong@nvidia.com> | 2011-01-25 16:36:47 +0900 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-03-10 21:41:44 -0800 |
commit | 6ee9323a103b20b8a01c0632411da3f74187636d (patch) | |
tree | 381b73e567908dffe6c9bfd5ffc1424b132c1e0d | |
parent | e790656d1a0d3f8b3bcefa17907c7f669148877f (diff) |
sdhci-tegra: use tasklet for card detection
If remove/insert sdcard continuously, kernel panic happened
due to lock up at sdhci_card_detect_callback(). The problem
was that sdhci_card_detect_callback() being called from
interrupt context. This code uses interfaces that cannot be
called while the kernel is atomic (no scheduling). With
using tasklet rather than directly call, detection call will
be scheduled. So tasklet will make sure of serialization for
card detection interrupt calls.
Bug 783446
Reviewed-on: http://git-master/r/16884
(cherry picked from commit a991cb2311799116f17504e137d0672650643ea6)
Change-Id: I4249e9e7becd9b5c0a4594b5cca6e5b5dc2184a4
Reviewed-on: http://git-master/r/21741
Reviewed-by: Bo Yan <byan@nvidia.com>
Tested-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index a16aa2b53417..2296cda1c760 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -46,7 +46,7 @@ static irqreturn_t carddetect_irq(int irq, void *data) { struct sdhci_host *sdhost = (struct sdhci_host *)data; - sdhci_card_detect_callback(sdhost); + tasklet_schedule(&sdhost->card_tasklet); return IRQ_HANDLED; }; |