提交 2bd6a935 编写于 作者: A Arnd Hannemann 提交者: Chris Ball

mmc: tmio_mmc: fix CMD irq handling

With current code card insert/eject interrupts will acknowledge outstanding
commands. Normally this seems to be no problem, however if the hardware gets
stuck and no interrupts for CMD_TIMEOUT or CMD_RESPEND are generated, then
inserting and ejecting cards will falsely acknowledge outstanding commands
from the core.

This patch changes the behavior so that CMDs are only acked, if
CMD_TIMEOUT or CMD_RESPEND is received.
Signed-off-by: NArnd Hannemann <arnd@arndnet.de>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 6ff56e0d
......@@ -727,8 +727,10 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid)
*/
/* Command completion */
if (ireg & TMIO_MASK_CMD) {
ack_mmc_irqs(host, TMIO_MASK_CMD);
if (ireg & (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT)) {
ack_mmc_irqs(host,
TMIO_STAT_CMDRESPEND |
TMIO_STAT_CMDTIMEOUT);
tmio_mmc_cmd_irq(host, status);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册