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:
"Six fixes to four drivers and two core fixes.

One core fix simply corrects a missed destroy_rcu_head() but the other
is hopefully the end of an ongoing effort to make suspend/resume play
nicely with scsi quiesce"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ibmvscsi: Fix empty event pool access during host removal
scsi: ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton
scsi: hisi_sas: Add softreset in hisi_sas_I_T_nexus_reset()
scsi: qla2xxx: Fix NULL pointer crash due to stale CPUID
scsi: qla2xxx: Fix FC-AL connection target discovery
scsi: core: Avoid that a kernel warning appears during system resume
scsi: core: Also call destroy_rcu_head() for passthrough requests
scsi: iscsi: flush running unbind operations when removing a session

+47 -8
+6
drivers/scsi/hisi_sas/hisi_sas_main.c
··· 1801 1801 } 1802 1802 hisi_sas_dereg_device(hisi_hba, device); 1803 1803 1804 + if (dev_is_sata(device)) { 1805 + rc = hisi_sas_softreset_ata_disk(device); 1806 + if (rc) 1807 + return TMF_RESP_FUNC_FAILED; 1808 + } 1809 + 1804 1810 rc = hisi_sas_debug_I_T_nexus_reset(device); 1805 1811 1806 1812 if ((rc == TMF_RESP_FUNC_COMPLETE) || (rc == -ENODEV))
+19 -4
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 96 96 static char partition_name[96] = "UNKNOWN"; 97 97 static unsigned int partition_number = -1; 98 98 static LIST_HEAD(ibmvscsi_head); 99 + static DEFINE_SPINLOCK(ibmvscsi_driver_lock); 99 100 100 101 static struct scsi_transport_template *ibmvscsi_transport_template; 101 102 ··· 2271 2270 } 2272 2271 2273 2272 dev_set_drvdata(&vdev->dev, hostdata); 2273 + spin_lock(&ibmvscsi_driver_lock); 2274 2274 list_add_tail(&hostdata->host_list, &ibmvscsi_head); 2275 + spin_unlock(&ibmvscsi_driver_lock); 2275 2276 return 0; 2276 2277 2277 2278 add_srp_port_failed: ··· 2295 2292 static int ibmvscsi_remove(struct vio_dev *vdev) 2296 2293 { 2297 2294 struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev); 2298 - list_del(&hostdata->host_list); 2299 - unmap_persist_bufs(hostdata); 2295 + unsigned long flags; 2296 + 2297 + srp_remove_host(hostdata->host); 2298 + scsi_remove_host(hostdata->host); 2299 + 2300 + purge_requests(hostdata, DID_ERROR); 2301 + 2302 + spin_lock_irqsave(hostdata->host->host_lock, flags); 2300 2303 release_event_pool(&hostdata->pool, hostdata); 2304 + spin_unlock_irqrestore(hostdata->host->host_lock, flags); 2305 + 2301 2306 ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, 2302 2307 max_events); 2303 2308 2304 2309 kthread_stop(hostdata->work_thread); 2305 - srp_remove_host(hostdata->host); 2306 - scsi_remove_host(hostdata->host); 2310 + unmap_persist_bufs(hostdata); 2311 + 2312 + spin_lock(&ibmvscsi_driver_lock); 2313 + list_del(&hostdata->host_list); 2314 + spin_unlock(&ibmvscsi_driver_lock); 2315 + 2307 2316 scsi_host_put(hostdata->host); 2308 2317 2309 2318 return 0;
+7
drivers/scsi/qla2xxx/qla_init.c
··· 4991 4991 if ((domain & 0xf0) == 0xf0) 4992 4992 continue; 4993 4993 4994 + /* Bypass if not same domain and area of adapter. */ 4995 + if (area && domain && ((area != vha->d_id.b.area) || 4996 + (domain != vha->d_id.b.domain)) && 4997 + (ha->current_topology == ISP_CFG_NL)) 4998 + continue; 4999 + 5000 + 4994 5001 /* Bypass invalid local loop ID. */ 4995 5002 if (loop_id > LAST_LOCAL_LOOP_ID) 4996 5003 continue;
+1 -1
drivers/scsi/qla2xxx/qla_os.c
··· 1517 1517 goto eh_reset_failed; 1518 1518 } 1519 1519 err = 2; 1520 - if (do_reset(fcport, cmd->device->lun, blk_mq_rq_cpu(cmd->request) + 1) 1520 + if (do_reset(fcport, cmd->device->lun, 1) 1521 1521 != QLA_SUCCESS) { 1522 1522 ql_log(ql_log_warn, vha, 0x800c, 1523 1523 "do_reset failed for cmd=%p.\n", cmd);
+12 -3
drivers/scsi/scsi_lib.c
··· 585 585 if (!blk_rq_is_scsi(req)) { 586 586 WARN_ON_ONCE(!(cmd->flags & SCMD_INITIALIZED)); 587 587 cmd->flags &= ~SCMD_INITIALIZED; 588 - destroy_rcu_head(&cmd->rcu); 589 588 } 589 + 590 + /* 591 + * Calling rcu_barrier() is not necessary here because the 592 + * SCSI error handler guarantees that the function called by 593 + * call_rcu() has been called before scsi_end_request() is 594 + * called. 595 + */ 596 + destroy_rcu_head(&cmd->rcu); 590 597 591 598 /* 592 599 * In the MQ case the command gets freed by __blk_mq_end_request, ··· 2548 2541 * device deleted during suspend) 2549 2542 */ 2550 2543 mutex_lock(&sdev->state_mutex); 2551 - sdev->quiesced_by = NULL; 2552 - blk_clear_pm_only(sdev->request_queue); 2544 + if (sdev->quiesced_by) { 2545 + sdev->quiesced_by = NULL; 2546 + blk_clear_pm_only(sdev->request_queue); 2547 + } 2553 2548 if (sdev->sdev_state == SDEV_QUIESCE) 2554 2549 scsi_device_set_state(sdev, SDEV_RUNNING); 2555 2550 mutex_unlock(&sdev->state_mutex);
+2
drivers/scsi/scsi_transport_iscsi.c
··· 2200 2200 scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE); 2201 2201 /* flush running scans then delete devices */ 2202 2202 flush_work(&session->scan_work); 2203 + /* flush running unbind operations */ 2204 + flush_work(&session->unbind_work); 2203 2205 __iscsi_unbind_session(&session->unbind_work); 2204 2206 2205 2207 /* hw iscsi may not have removed all connections from session */