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:
"Three small fixes, all in drivers.

The sas one is in an unlikely error leg, the debug one is to make it
more standards conformant and the ibmvfc one is to fix a user visible
bug where a failover could lose all paths to the device"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: scsi_debug: Make the READ CAPACITY response compliant with ZBC
scsi: scsi_transport_sas: Fix error handling in sas_phy_add()
scsi: ibmvfc: Avoid path failures during live migration

+28 -8
+11 -3
drivers/scsi/ibmvscsi/ibmvfc.c
··· 708 memset(vhost->async_crq.msgs.async, 0, PAGE_SIZE); 709 vhost->async_crq.cur = 0; 710 711 - list_for_each_entry(tgt, &vhost->targets, queue) 712 - ibmvfc_del_tgt(tgt); 713 scsi_block_requests(vhost->host); 714 ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT); 715 vhost->job_step = ibmvfc_npiv_login; ··· 3240 /* We need to re-setup the interpartition connection */ 3241 dev_info(vhost->dev, "Partition migrated, Re-enabling adapter\n"); 3242 vhost->client_migrated = 1; 3243 ibmvfc_purge_requests(vhost, DID_REQUEUE); 3244 - ibmvfc_link_down(vhost, IBMVFC_LINK_DOWN); 3245 ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_REENABLE); 3246 } else if (crq->format == IBMVFC_PARTNER_FAILED || crq->format == IBMVFC_PARTNER_DEREGISTER) { 3247 dev_err(vhost->dev, "Host partner adapter deregistered or failed (rc=%d)\n", crq->format); 3248 ibmvfc_purge_requests(vhost, DID_ERROR);
··· 708 memset(vhost->async_crq.msgs.async, 0, PAGE_SIZE); 709 vhost->async_crq.cur = 0; 710 711 + list_for_each_entry(tgt, &vhost->targets, queue) { 712 + if (vhost->client_migrated) 713 + tgt->need_login = 1; 714 + else 715 + ibmvfc_del_tgt(tgt); 716 + } 717 + 718 scsi_block_requests(vhost->host); 719 ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT); 720 vhost->job_step = ibmvfc_npiv_login; ··· 3235 /* We need to re-setup the interpartition connection */ 3236 dev_info(vhost->dev, "Partition migrated, Re-enabling adapter\n"); 3237 vhost->client_migrated = 1; 3238 + 3239 + scsi_block_requests(vhost->host); 3240 ibmvfc_purge_requests(vhost, DID_REQUEUE); 3241 + ibmvfc_set_host_state(vhost, IBMVFC_LINK_DOWN); 3242 ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_REENABLE); 3243 + wake_up(&vhost->work_wait_q); 3244 } else if (crq->format == IBMVFC_PARTNER_FAILED || crq->format == IBMVFC_PARTNER_DEREGISTER) { 3245 dev_err(vhost->dev, "Host partner adapter deregistered or failed (rc=%d)\n", crq->format); 3246 ibmvfc_purge_requests(vhost, DID_ERROR);
+7
drivers/scsi/scsi_debug.c
··· 1899 arr[14] |= 0x40; 1900 } 1901 1902 arr[15] = sdebug_lowest_aligned & 0xff; 1903 1904 if (have_dif_prot) {
··· 1899 arr[14] |= 0x40; 1900 } 1901 1902 + /* 1903 + * Since the scsi_debug READ CAPACITY implementation always reports the 1904 + * total disk capacity, set RC BASIS = 1 for host-managed ZBC devices. 1905 + */ 1906 + if (devip->zmodel == BLK_ZONED_HM) 1907 + arr[12] |= 1 << 4; 1908 + 1909 arr[15] = sdebug_lowest_aligned & 0xff; 1910 1911 if (have_dif_prot) {
+10 -5
drivers/scsi/scsi_transport_sas.c
··· 722 int error; 723 724 error = device_add(&phy->dev); 725 - if (!error) { 726 - transport_add_device(&phy->dev); 727 - transport_configure_device(&phy->dev); 728 - } 729 730 - return error; 731 } 732 EXPORT_SYMBOL(sas_phy_add); 733
··· 722 int error; 723 724 error = device_add(&phy->dev); 725 + if (error) 726 + return error; 727 728 + error = transport_add_device(&phy->dev); 729 + if (error) { 730 + device_del(&phy->dev); 731 + return error; 732 + } 733 + transport_configure_device(&phy->dev); 734 + 735 + return 0; 736 } 737 EXPORT_SYMBOL(sas_phy_add); 738