diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2023-11-14 11:40:40 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-11-14 11:40:40 -0500 |
commit | 2a0508d9d08f0c3e354044d4f48466ee0d225041 (patch) | |
tree | 0526c0e7a52f6dd7b1f03731f79c73166cd7af92 /drivers/ufs | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
parent | e439e4a62a8ea3c39d65c546de3af7d1c594077c (diff) | |
download | lwn-2a0508d9d08f0c3e354044d4f48466ee0d225041.tar.gz lwn-2a0508d9d08f0c3e354044d4f48466ee0d225041.zip |
Merge branch '6.7/scsi-staging' into 6.7/scsi-fixes
Pull in queued fixes for 6.7
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r-- | drivers/ufs/core/ufs-mcq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c index 2ba8ec254dce..0787456c2b89 100644 --- a/drivers/ufs/core/ufs-mcq.c +++ b/drivers/ufs/core/ufs-mcq.c @@ -436,7 +436,7 @@ int ufshcd_mcq_init(struct ufs_hba *hba) for (i = 0; i < hba->nr_hw_queues; i++) { hwq = &hba->uhq[i]; - hwq->max_entries = hba->nutrs; + hwq->max_entries = hba->nutrs + 1; spin_lock_init(&hwq->sq_lock); spin_lock_init(&hwq->cq_lock); mutex_init(&hwq->sq_mutex); @@ -630,6 +630,7 @@ int ufshcd_mcq_abort(struct scsi_cmnd *cmd) int tag = scsi_cmd_to_rq(cmd)->tag; struct ufshcd_lrb *lrbp = &hba->lrb[tag]; struct ufs_hw_queue *hwq; + unsigned long flags; int err = FAILED; if (!ufshcd_cmd_inflight(lrbp->cmd)) { @@ -670,8 +671,10 @@ int ufshcd_mcq_abort(struct scsi_cmnd *cmd) } err = SUCCESS; + spin_lock_irqsave(&hwq->cq_lock, flags); if (ufshcd_cmd_inflight(lrbp->cmd)) ufshcd_release_scsi_cmd(hba, lrbp); + spin_unlock_irqrestore(&hwq->cq_lock, flags); out: return err; |