diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-09-18 06:42:42 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-10-17 03:49:28 +0100 |
commit | cf06b5a1c78a13ff25d8b2d367770b2936316006 (patch) | |
tree | 5ff1a502550696964885d8f99c57e158247966ff | |
parent | b1f9cafbf2313768160d3d2587deba1f099fc5f5 (diff) |
mmc: sh-mmcif: avoid oops on spurious interrupts
commit 8464dd52d3198dd05cafb005371d76e5339eb842 upstream.
On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious
interrupts without any active request. To prevent the Oops, that results
in such cases, don't dereference the mmc request pointer until we make
sure, that we are indeed processing such a request.
Reported-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index d5505f3fe2a1..559d30d695b9 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1003,6 +1003,10 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id) host->sd_error = true; dev_dbg(&host->pd->dev, "int err state = %08x\n", state); } + if (host->state == STATE_IDLE) { + dev_info(&host->pd->dev, "Spurious IRQ status 0x%x", state); + return IRQ_HANDLED; + } if (state & ~(INT_CMD12RBE | INT_CMD12CRE)) complete(&host->intr_wait); else |