Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"One 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"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: sd: Do not repeat the starting disk message
scsi: ufs: core: Fix ufshcd_abort_one racing issue
scsi: ufs: core: Fix ufshcd_clear_cmd racing issue

+10 -8
+2 -3
drivers/scsi/sd.c
··· 4119 4119 { 4120 4120 struct scsi_disk *sdkp = dev_get_drvdata(dev); 4121 4121 4122 - sd_printk(KERN_NOTICE, sdkp, "Starting disk\n"); 4123 - 4124 4122 if (opal_unlock_from_suspend(sdkp->opal_dev)) { 4125 4123 sd_printk(KERN_NOTICE, sdkp, "OPAL unlock failed\n"); 4126 4124 return -EIO; ··· 4135 4137 if (!sdkp) /* E.g.: runtime resume at the start of sd_probe() */ 4136 4138 return 0; 4137 4139 4140 + sd_printk(KERN_NOTICE, sdkp, "Starting disk\n"); 4141 + 4138 4142 if (!sd_do_start_stop(sdkp->device, runtime)) { 4139 4143 sdkp->suspended = false; 4140 4144 return 0; 4141 4145 } 4142 4146 4143 - sd_printk(KERN_NOTICE, sdkp, "Starting disk\n"); 4144 4147 ret = sd_start_stop_device(sdkp, 1); 4145 4148 if (!ret) { 4146 4149 sd_resume(dev);
+6 -5
drivers/ufs/core/ufs-mcq.c
··· 105 105 * @hba: per adapter instance 106 106 * @req: pointer to the request to be issued 107 107 * 108 - * Return: the hardware queue instance on which the request would 109 - * be queued. 108 + * Return: the hardware queue instance on which the request will be or has 109 + * been queued. %NULL if the request has already been freed. 110 110 */ 111 111 struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba, 112 112 struct request *req) 113 113 { 114 - u32 utag = blk_mq_unique_tag(req); 115 - u32 hwq = blk_mq_unique_tag_to_hwq(utag); 114 + struct blk_mq_hw_ctx *hctx = READ_ONCE(req->mq_hctx); 116 115 117 - return &hba->uhq[hwq]; 116 + return hctx ? &hba->uhq[hctx->queue_num] : NULL; 118 117 } 119 118 120 119 /** ··· 514 515 if (!cmd) 515 516 return -EINVAL; 516 517 hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd)); 518 + if (!hwq) 519 + return 0; 517 520 } else { 518 521 hwq = hba->dev_cmd_queue; 519 522 }
+2
drivers/ufs/core/ufshcd.c
··· 6456 6456 /* Release cmd in MCQ mode if abort succeeds */ 6457 6457 if (is_mcq_enabled(hba) && (*ret == 0)) { 6458 6458 hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(lrbp->cmd)); 6459 + if (!hwq) 6460 + return 0; 6459 6461 spin_lock_irqsave(&hwq->cq_lock, flags); 6460 6462 if (ufshcd_cmd_inflight(lrbp->cmd)) 6461 6463 ufshcd_release_scsi_cmd(hba, lrbp);