SCSI fixes for 6.10-rc7
Subsystems (2)
James Bottomley
maintainerOne core change that moves a disk start message to a location where it will only be printed once instead of twice plus a couple of error handling race fixes in the ufs driver.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Damien Le Moal (1):
scsi: sd: Do not repeat the starting disk message
Peter Wang (2):
scsi: ufs: core: Fix ufshcd_abort_one racing issue
scsi: ufs: core: Fix ufshcd_clear_cmd racing issue
And the diffstat:
drivers/scsi/sd.c | 5 ++--- drivers/ufs/core/ufs-mcq.c | 11 ++++++----- drivers/ufs/core/ufshcd.c | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-)
With full diff below
James
---
drivers/scsi/sd.c +2 -3
@@ -4117,8 +4117,6 @@ static int sd_resume(struct device *dev) {struct scsi_disk *sdkp =dev_get_drvdata (dev); -sd_printk (KERN_NOTICE , sdkp,"Starting disk\n" ); -if (opal_unlock_from_suspend (sdkp->opal_dev)) {sd_printk (KERN_NOTICE , sdkp,"OPAL unlock failed\n" );return -EIO ;
@@ -4135,12 +4133,13 @@ static int sd_resume_common(struct device *dev, bool runtime)if (!sdkp)/* E.g.: runtime resume at the start of sd_probe() */ return 0 ; +sd_printk (KERN_NOTICE , sdkp,"Starting disk\n" ); +if (!sd_do_start_stop (sdkp->device, runtime)) { sdkp->suspended = false;return 0 ; } -sd_printk (KERN_NOTICE , sdkp,"Starting disk\n" ); ret =sd_start_stop_device (sdkp,1 );if (!ret) {sd_resume (dev);
drivers/ufs/core/ufs-mcq.c +6 -5
@@ -105,16 +105,15 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_config_mac);* @hba: per adapter instance * @req: pointer to the request to be issued * -* Return: the hardware queue instance on which the request would -* be queued. +* Return: the hardware queue instance on which the request will be or has +* been queued. %NULL if the request has already been freed. */ struct ufs_hw_queue *ufshcd_mcq_req_to_hwq (struct ufs_hba *hba,struct request *req) { -u32 utag =blk_mq_unique_tag (req); -u32 hwq =blk_mq_unique_tag_to_hwq (utag); +struct blk_mq_hw_ctx *hctx =READ_ONCE (req->mq_hctx); -return &hba->uhq[hwq]; +return hctx ? &hba->uhq[hctx->queue_num] :NULL ; }/**
@@ -515,6 +514,8 @@ int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba, int task_tag)if (!cmd)return -EINVAL ; hwq =ufshcd_mcq_req_to_hwq (hba,scsi_cmd_to_rq (cmd)); +if (!hwq) +return 0 ; }else { hwq = hba->dev_cmd_queue; }
drivers/ufs/core/ufshcd.c +2 -0
@@ -6456,6 +6456,8 @@ static bool ufshcd_abort_one(struct request *rq, void *priv)/* 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)); +if (!hwq) +return 0 ;spin_lock_irqsave (&hwq->cq_lock, flags);if (ufshcd_cmd_inflight (lrbp->cmd))ufshcd_release_scsi_cmd (hba, lrbp);
The pull request you sent on Wed, 10 Jul 2024 10:48:56 -0700:
The pull request you sent on Wed, 10 Jul 2024 10:48:56 -0700:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ef2b7eb55e10294f4f384f21506ef20a6184128c
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html