aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-12-12 09:38:17 -0500
committerChris Ball <cjb@laptop.org>2013-01-28 06:51:33 -0500
commitb31d6370588f7ebfb25fbba58ca40e192c1b616c (patch)
tree5e7d74a1795bbcba2b7b3e4a4e254d53e47f9ad3 /drivers
parent1fcfebfe49f0fe3c3311decdcb3ad411d48feb59 (diff)
mmc: sh-mmcif: fix I/O errors
The INT_BUFWEN IRQ often arrives with other bits set too. If they are not cleared, an additional IRQ can be triggered, sometimes also after the MMC request has already been completed. This leads to block I/O errors. Earlier Teppei Kamijou also observed these additional interrupts and proposed to explicitly wait for them. This patch chooses an alternative approach of clearing all active bits immediately, when processing the main interrupt. Reported-by: Teppei Kamijou <teppei.kamijou.yb@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sh_mmcif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 1c37854c0f33..e6a6d2363a4d 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1238,7 +1238,9 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
1238 sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~INT_BUFREN); 1238 sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~INT_BUFREN);
1239 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MBUFREN); 1239 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MBUFREN);
1240 } else if (state & INT_BUFWEN) { 1240 } else if (state & INT_BUFWEN) {
1241 sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~INT_BUFWEN); 1241 sh_mmcif_writel(host->addr, MMCIF_CE_INT,
1242 ~(INT_BUFWEN | INT_DTRANE | INT_CMD12DRE |
1243 INT_CMD12RBE | INT_CMD12CRE));
1242 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MBUFWEN); 1244 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MBUFWEN);
1243 } else if (state & INT_CMD12DRE) { 1245 } else if (state & INT_CMD12DRE) {
1244 sh_mmcif_writel(host->addr, MMCIF_CE_INT, 1246 sh_mmcif_writel(host->addr, MMCIF_CE_INT,