From ac666c99ee952f10603c26a05a57b78e23eb123d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 10 Feb 2023 11:32:57 -0800 Subject: [PATCH] UPSTREAM: scsi: ufs: core: Rely on the block layer for setting RQF_PM Do not set RQF_PM explicitly since scsi_alloc_request() sets it indirectly if BLK_MQ_REQ_PM is set. The call chain for the code that sets RQF_PM is as follows: scsi_alloc_request() blk_mq_alloc_request() __blk_mq_alloc_requests() blk_mq_rq_ctx_init() if (data->flags & BLK_MQ_REQ_PM) data->rq_flags |= RQF_PM; Link: https://lore.kernel.org/r/20230210193258.4004923-3-bvanassche@acm.org Cc: Mike Christie Cc: John Garry Reviewed-by: John Garry Change-Id: Ia22b419fab491b2cd328e95ff3ff89050b98d360 Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen Bug: 267974767 (cherry picked from commit 93bc4a5d00e472003ae983bb21febd2519a64f62) Signed-off-by: Bart Van Assche --- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 2ee20217354e..fd4961ab9a96 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -9163,7 +9163,7 @@ static int ufshcd_execute_start_stop(struct scsi_device *sdev, scmd->allowed = 0/*retries*/; scmd->flags |= SCMD_FAIL_IF_RECOVERING; req->timeout = 1 * HZ; - req->rq_flags |= RQF_PM | RQF_QUIET; + req->rq_flags |= RQF_QUIET; blk_execute_rq(req, /*at_head=*/true);