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

Commit 8cd640e8 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma
Browse files

block: allow REQ_PM requests even when the device is suspended



Some times even though the block device is suspended by the block layer
the low-level driver might want to queue the PM requests to the device.
Allow such requests to get peeked as the blk_pm_add_request() has already
added it to the I/O scheduler otherwise the request would be forever stuck
in the I/O scheduler without being fetched by the driver.

Change-Id: I353943a7008ea1d92ff825d220cad1828fe37c27
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 4a149ed1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2140,8 +2140,7 @@ static void blk_account_io_done(struct request *req)
static struct request *blk_pm_peek_request(struct request_queue *q,
					   struct request *rq)
{
	if (q->dev && (q->rpm_status == RPM_SUSPENDED ||
	    (q->rpm_status != RPM_ACTIVE && !(rq->cmd_flags & REQ_PM))))
	if (q->dev && q->rpm_status != RPM_ACTIVE && !(rq->cmd_flags & REQ_PM))
		return NULL;
	else
		return rq;