summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkat Gopalakrishnan <venkatg@codeaurora.org>2016-01-28 18:57:07 -0800
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:28:09 -0700
commit861ecf399bd1c94c0b640e1b8da7691b1d0b08f3 (patch)
tree039d709b7fcaaffa5fdf4f8f5303c208c9f625d9
parente78c71343571f0d59d3577226440388782cd890b (diff)
mmc: queue: Don't peek requests when queue is stopped
Make sure we don't peek the block layer queue and act on it when block queue is stopped. The block queue will be stopped when mmc block is suspended, wait till it is properly resumed before pulling new requests. Change-Id: Ifc369687c13dae904271e8f92d3604edbd667d82 Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
-rw-r--r--drivers/mmc/card/queue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 01e87f4480ae..bc5ed3924c98 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -59,9 +59,11 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
static struct request *mmc_peek_request(struct mmc_queue *mq)
{
struct request_queue *q = mq->queue;
+ mq->cmdq_req_peeked = NULL;
spin_lock_irq(q->queue_lock);
- mq->cmdq_req_peeked = blk_peek_request(q);
+ if (!blk_queue_stopped(q))
+ mq->cmdq_req_peeked = blk_peek_request(q);
spin_unlock_irq(q->queue_lock);
return mq->cmdq_req_peeked;