]>
Commit | Line | Data |
---|---|---|
6cbd67ed GKH |
1 | From 8464dd52d3198dd05cafb005371d76e5339eb842 Mon Sep 17 00:00:00 2001 |
2 | From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | |
3 | Date: Tue, 18 Sep 2012 06:42:42 +0000 | |
4 | Subject: mmc: sh-mmcif: avoid oops on spurious interrupts | |
5 | ||
6 | From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | |
7 | ||
8 | commit 8464dd52d3198dd05cafb005371d76e5339eb842 upstream. | |
9 | ||
10 | On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious | |
11 | interrupts without any active request. To prevent the Oops, that results | |
12 | in such cases, don't dereference the mmc request pointer until we make | |
13 | sure, that we are indeed processing such a request. | |
14 | ||
15 | Reported-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> | |
16 | Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | |
17 | Signed-off-by: Chris Ball <cjb@laptop.org> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/mmc/host/sh_mmcif.c | 4 ++++ | |
22 | 1 file changed, 4 insertions(+) | |
23 | ||
24 | --- a/drivers/mmc/host/sh_mmcif.c | |
25 | +++ b/drivers/mmc/host/sh_mmcif.c | |
26 | @@ -1229,6 +1229,10 @@ static irqreturn_t sh_mmcif_intr(int irq | |
27 | host->sd_error = true; | |
28 | dev_dbg(&host->pd->dev, "int err state = %08x\n", state); | |
29 | } | |
30 | + if (host->state == STATE_IDLE) { | |
31 | + dev_info(&host->pd->dev, "Spurious IRQ status 0x%x", state); | |
32 | + return IRQ_HANDLED; | |
33 | + } | |
34 | if (state & ~(INT_CMD12RBE | INT_CMD12CRE)) { | |
35 | if (!host->dma_active) | |
36 | return IRQ_WAKE_THREAD; |