diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2013-01-22 05:48:07 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-02-24 14:37:12 -0500 |
commit | 7a81902fa52f2b6f5037e167f74ebb5a41cfc7d1 (patch) | |
tree | a01ef6d9c14c1168a1e42c5f223ed161a78d3067 /drivers/mmc/card | |
parent | 9b844961c265a8ee4bdacd8404d078d7f1319957 (diff) |
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: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index f79b4688e471..1170afe1a596 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1456,8 +1456,14 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) | |||
1456 | 1456 | ||
1457 | start_new_req: | 1457 | start_new_req: |
1458 | if (rqc) { | 1458 | if (rqc) { |
1459 | mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); | 1459 | if (mmc_card_removed(card)) { |
1460 | mmc_start_req(card->host, &mq->mqrq_cur->mmc_active, NULL); | 1460 | rqc->cmd_flags |= REQ_QUIET; |
1461 | blk_end_request_all(rqc, -EIO); | ||
1462 | } else { | ||
1463 | mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); | ||
1464 | mmc_start_req(card->host, | ||
1465 | &mq->mqrq_cur->mmc_active, NULL); | ||
1466 | } | ||
1461 | } | 1467 | } |
1462 | 1468 | ||
1463 | return 0; | 1469 | return 0; |