Skip to content

Commit 7a7eb32

Browse files
lyakhcjb
authored andcommitted
mmc: sh-mmcif: properly handle MMC_WRITE_MULTIPLE_BLOCK completion IRQ
Upon completion of a MMC_WRITE_MULTIPLE_BLOCK command MMCIF issues an IRQ with the DTRANE bit set and often with one or several of CMD12 bits set. If those interrupts are not acknowledged, an additional interrupt can be produced and will be delivered later, possibly, when the transaction has already been completed. To prevent this from happening, CMD12 completion interrupt sources have to be cleared too upon reception of an DTRANE IRQ. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Signed-off-by: Chris Ball <cjb@laptop.org>
1 parent 387a8cb commit 7a7eb32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/sh_mmcif.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,9 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
12131213
sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~INT_BUFRE);
12141214
sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MBUFRE);
12151215
} else if (state & INT_DTRANE) {
1216-
sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~INT_DTRANE);
1216+
sh_mmcif_writel(host->addr, MMCIF_CE_INT,
1217+
~(INT_CMD12DRE | INT_CMD12RBE |
1218+
INT_CMD12CRE | INT_DTRANE));
12171219
sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, MASK_MDTRANE);
12181220
} else if (state & INT_CMD12RBE) {
12191221
sh_mmcif_writel(host->addr, MMCIF_CE_INT,

0 commit comments

Comments
 (0)