scsi: ufs: core: Make blk_mq_tagset_busy_iter() skip reserved requests
A later patch will convert hba->reserved_slot into a reserved tag. Make blk_mq_tagset_busy_iter() skip reserved requests such that device management commands are skipped. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251031204029.2883185-27-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
9a2c950092
commit
4b6c0d9cca
@@ -644,6 +644,7 @@ static bool ufshcd_print_tr_iter(struct request *req, void *priv)
|
|||||||
struct Scsi_Host *shost = sdev->host;
|
struct Scsi_Host *shost = sdev->host;
|
||||||
struct ufs_hba *hba = shost_priv(shost);
|
struct ufs_hba *hba = shost_priv(shost);
|
||||||
|
|
||||||
|
if (!blk_mq_is_reserved_rq(req))
|
||||||
ufshcd_print_tr(hba, blk_mq_rq_to_pdu(req), *(bool *)priv);
|
ufshcd_print_tr(hba, blk_mq_rq_to_pdu(req), *(bool *)priv);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -5753,7 +5754,7 @@ static bool ufshcd_mcq_force_compl_one(struct request *rq, void *priv)
|
|||||||
struct ufs_hba *hba = shost_priv(shost);
|
struct ufs_hba *hba = shost_priv(shost);
|
||||||
struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq);
|
struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq);
|
||||||
|
|
||||||
if (!hwq)
|
if (blk_mq_is_reserved_rq(rq) || !hwq)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
|
ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
|
||||||
@@ -5780,7 +5781,7 @@ static bool ufshcd_mcq_compl_one(struct request *rq, void *priv)
|
|||||||
struct ufs_hba *hba = shost_priv(shost);
|
struct ufs_hba *hba = shost_priv(shost);
|
||||||
struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq);
|
struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq);
|
||||||
|
|
||||||
if (hwq)
|
if (!blk_mq_is_reserved_rq(rq) && hwq)
|
||||||
ufshcd_mcq_poll_cqe_lock(hba, hwq);
|
ufshcd_mcq_poll_cqe_lock(hba, hwq);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -6648,6 +6649,9 @@ static bool ufshcd_abort_one(struct request *rq, void *priv)
|
|||||||
struct Scsi_Host *shost = sdev->host;
|
struct Scsi_Host *shost = sdev->host;
|
||||||
struct ufs_hba *hba = shost_priv(shost);
|
struct ufs_hba *hba = shost_priv(shost);
|
||||||
|
|
||||||
|
if (blk_mq_is_reserved_rq(rq))
|
||||||
|
return true;
|
||||||
|
|
||||||
*ret = ufshcd_try_to_abort_task(hba, tag);
|
*ret = ufshcd_try_to_abort_task(hba, tag);
|
||||||
dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag,
|
dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag,
|
||||||
ufshcd_is_scsi_cmd(cmd) ? cmd->cmnd[0] : -1,
|
ufshcd_is_scsi_cmd(cmd) ? cmd->cmnd[0] : -1,
|
||||||
@@ -7597,7 +7601,7 @@ static bool ufshcd_clear_lu_cmds(struct request *req, void *priv)
|
|||||||
const u64 lun = *(u64 *)priv;
|
const u64 lun = *(u64 *)priv;
|
||||||
const u32 tag = req->tag;
|
const u32 tag = req->tag;
|
||||||
|
|
||||||
if (sdev->lun != lun)
|
if (blk_mq_is_reserved_rq(req) || sdev->lun != lun)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (ufshcd_clear_cmd(hba, tag) < 0) {
|
if (ufshcd_clear_cmd(hba, tag) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user