提交 d198f101 编写于 作者: P Pierre Ossman

mmc_block: check card state after write

Some cards have been reported to signal that they're ready prematurely.
Checking both the busy bit and card state solves the issue.
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 2ffbb837
......@@ -321,7 +321,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
req->rq_disk->disk_name, err);
goto cmd_err;
}
} while (!(cmd.resp[0] & R1_READY_FOR_DATA));
/*
* Some cards mishandle the status bits,
* so make sure to check both the busy
* indication and the card state.
*/
} while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
(R1_CURRENT_STATE(cmd.resp[0]) == 7));
#if 0
if (cmd.resp[0] & ~0x00000900)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册