提交 7a81902f 编写于 作者: S Seungwon Jeon 提交者: Chris Ball

mmc: block: don't start new request when the card is removed

It's not necessary to start a new request while error handling if
the card was removed.
Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com>
Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
Tested-by: NKonstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 9b844961
...@@ -1456,8 +1456,14 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) ...@@ -1456,8 +1456,14 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
start_new_req: start_new_req:
if (rqc) { if (rqc) {
mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); if (mmc_card_removed(card)) {
mmc_start_req(card->host, &mq->mqrq_cur->mmc_active, NULL); rqc->cmd_flags |= REQ_QUIET;
blk_end_request_all(rqc, -EIO);
} else {
mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
mmc_start_req(card->host,
&mq->mqrq_cur->mmc_active, NULL);
}
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册