scsi: ufs: core: Changing the status to check inflight
authorSEO HOYOUNG <hy50.seo@samsung.com>
Thu, 11 Apr 2024 07:14:44 +0000 (16:14 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 12 Apr 2024 01:54:22 +0000 (21:54 -0400)
commit13c28be58c2bdb12e554e01b0e35621060068b11
treeabe535a28e4bd35e93a87717a140573715aa94db
parenta33a502d50fddc85e8d5072cf39ff8fe19ba3025
scsi: ufs: core: Changing the status to check inflight

ufshcd_cmd_inflight() is used to check whether or not a command is in
progress.  Make it skip commands that have already completed by changing
the !blk_mq_request_started(rq) check into blk_mq_rq_state(rq) !=
MQ_RQ_IN_FLIGHT.  We cannot rely on lrbp->cmd since lrbp->cmd is not
cleared when a command completes.

Link: https://lore.kernel.org/linux-scsi/20230517223157.1068210-3-bvanassche@acm.org/
Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
Link: https://lore.kernel.org/r/20240411071444.51873-1-hy50.seo@samsung.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c