diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-11 09:10:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-11 09:10:42 +0100 |
commit | e045e18dbf3eaac32cdeb2799a5ec84fa694636c (patch) | |
tree | d105f70b32d8d0af07e2c5688849c93d25832933 /drivers/ufs | |
parent | ae5af710f369a4d88792bf1d9da317884156cd87 (diff) | |
parent | a39b6ac3781d46ba18193c9dbb2110f31e9bffe9 (diff) | |
download | linux-e045e18dbf3eaac32cdeb2799a5ec84fa694636c.tar.gz linux-e045e18dbf3eaac32cdeb2799a5ec84fa694636c.tar.bz2 linux-e045e18dbf3eaac32cdeb2799a5ec84fa694636c.zip |
Merge 6.7-rc5 into tty-next
We need the serial fixes in here as well to build off of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ufs')
-rw-r--r-- | drivers/ufs/core/ufshcd.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 8b1031fb0a44..bce0d2a9a7f3 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -6444,11 +6444,24 @@ static bool ufshcd_abort_one(struct request *rq, void *priv) struct scsi_device *sdev = cmd->device; struct Scsi_Host *shost = sdev->host; struct ufs_hba *hba = shost_priv(shost); + struct ufshcd_lrb *lrbp = &hba->lrb[tag]; + struct ufs_hw_queue *hwq; + unsigned long flags; *ret = ufshcd_try_to_abort_task(hba, tag); dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag, hba->lrb[tag].cmd ? hba->lrb[tag].cmd->cmnd[0] : -1, *ret ? "failed" : "succeeded"); + + /* Release cmd in MCQ mode if abort succeeds */ + if (is_mcq_enabled(hba) && (*ret == 0)) { + hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(lrbp->cmd)); + 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); + } + return *ret == 0; } |