aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r--drivers/mmc/card/queue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index dcad59cbfef1..2517547b4366 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -29,6 +29,8 @@
29 */ 29 */
30static int mmc_prep_request(struct request_queue *q, struct request *req) 30static int mmc_prep_request(struct request_queue *q, struct request *req)
31{ 31{
32 struct mmc_queue *mq = q->queuedata;
33
32 /* 34 /*
33 * We only like normal block requests and discards. 35 * We only like normal block requests and discards.
34 */ 36 */
@@ -37,6 +39,9 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
37 return BLKPREP_KILL; 39 return BLKPREP_KILL;
38 } 40 }
39 41
42 if (mq && mmc_card_removed(mq->card))
43 return BLKPREP_KILL;
44
40 req->cmd_flags |= REQ_DONTPREP; 45 req->cmd_flags |= REQ_DONTPREP;
41 46
42 return BLKPREP_OK; 47 return BLKPREP_OK;