Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cfc8552 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

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: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 30b0c37a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -58,8 +58,10 @@ 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);
	if (!blk_queue_stopped(q))
		mq->cmdq_req_peeked = blk_peek_request(q);
	spin_unlock_irq(q->queue_lock);