scsi: ufs: core: Rely on the block layer for setting RQF_PM
authorBart Van Assche <bvanassche@acm.org>
Fri, 10 Feb 2023 19:32:57 +0000 (11:32 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Feb 2023 03:00:51 +0000 (22:00 -0500)
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 <michael.christie@oracle.com>
Cc: John Garry <john.g.garry@oracle.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index 47c7739b9a868f1279dc4ef4a2d87263d1f0bdff..9d8e03b30014e1fe384a81aefdebbed2c2c3a6eb 100644 (file)
@@ -9150,7 +9150,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);