diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2017-03-12 12:02:56 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2017-03-12 12:02:56 -0400 |
commit | a11be42a278e6526d4d297ddf6676e934318d7c3 (patch) | |
tree | 88be657350cbdb0ec1291586a030d957bff1dcce | |
parent | e2a3a67302fbe2431fc6d7c313073da5b2b4c293 (diff) | |
parent | 85e8a23936ab3442de0c42da97d53b29f004ece1 (diff) |
Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 1 | ||||
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 27 |
2 files changed, 18 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 661bd25a404a..2697d49da4d7 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -12059,6 +12059,7 @@ static struct pci_driver lpfc_driver = { | |||
12059 | .id_table = lpfc_id_table, | 12059 | .id_table = lpfc_id_table, |
12060 | .probe = lpfc_pci_probe_one, | 12060 | .probe = lpfc_pci_probe_one, |
12061 | .remove = lpfc_pci_remove_one, | 12061 | .remove = lpfc_pci_remove_one, |
12062 | .shutdown = lpfc_pci_remove_one, | ||
12062 | .suspend = lpfc_pci_suspend_one, | 12063 | .suspend = lpfc_pci_suspend_one, |
12063 | .resume = lpfc_pci_resume_one, | 12064 | .resume = lpfc_pci_resume_one, |
12064 | .err_handler = &lpfc_err_handler, | 12065 | .err_handler = &lpfc_err_handler, |
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 638e5f427c90..016639d7fef1 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c | |||
@@ -400,8 +400,6 @@ MODULE_PARM_DESC(storvsc_vcpus_per_sub_channel, "Ratio of VCPUs to subchannels") | |||
400 | */ | 400 | */ |
401 | static int storvsc_timeout = 180; | 401 | static int storvsc_timeout = 180; |
402 | 402 | ||
403 | static int msft_blist_flags = BLIST_TRY_VPD_PAGES; | ||
404 | |||
405 | #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS) | 403 | #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS) |
406 | static struct scsi_transport_template *fc_transport_template; | 404 | static struct scsi_transport_template *fc_transport_template; |
407 | #endif | 405 | #endif |
@@ -1383,6 +1381,22 @@ static int storvsc_do_io(struct hv_device *device, | |||
1383 | return ret; | 1381 | return ret; |
1384 | } | 1382 | } |
1385 | 1383 | ||
1384 | static int storvsc_device_alloc(struct scsi_device *sdevice) | ||
1385 | { | ||
1386 | /* | ||
1387 | * Set blist flag to permit the reading of the VPD pages even when | ||
1388 | * the target may claim SPC-2 compliance. MSFT targets currently | ||
1389 | * claim SPC-2 compliance while they implement post SPC-2 features. | ||
1390 | * With this flag we can correctly handle WRITE_SAME_16 issues. | ||
1391 | * | ||
1392 | * Hypervisor reports SCSI_UNKNOWN type for DVD ROM device but | ||
1393 | * still supports REPORT LUN. | ||
1394 | */ | ||
1395 | sdevice->sdev_bflags = BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES; | ||
1396 | |||
1397 | return 0; | ||
1398 | } | ||
1399 | |||
1386 | static int storvsc_device_configure(struct scsi_device *sdevice) | 1400 | static int storvsc_device_configure(struct scsi_device *sdevice) |
1387 | { | 1401 | { |
1388 | 1402 | ||
@@ -1396,14 +1410,6 @@ static int storvsc_device_configure(struct scsi_device *sdevice) | |||
1396 | sdevice->no_write_same = 1; | 1410 | sdevice->no_write_same = 1; |
1397 | 1411 | ||
1398 | /* | 1412 | /* |
1399 | * Add blist flags to permit the reading of the VPD pages even when | ||
1400 | * the target may claim SPC-2 compliance. MSFT targets currently | ||
1401 | * claim SPC-2 compliance while they implement post SPC-2 features. | ||
1402 | * With this patch we can correctly handle WRITE_SAME_16 issues. | ||
1403 | */ | ||
1404 | sdevice->sdev_bflags |= msft_blist_flags; | ||
1405 | |||
1406 | /* | ||
1407 | * If the host is WIN8 or WIN8 R2, claim conformance to SPC-3 | 1413 | * If the host is WIN8 or WIN8 R2, claim conformance to SPC-3 |
1408 | * if the device is a MSFT virtual device. If the host is | 1414 | * if the device is a MSFT virtual device. If the host is |
1409 | * WIN10 or newer, allow write_same. | 1415 | * WIN10 or newer, allow write_same. |
@@ -1661,6 +1667,7 @@ static struct scsi_host_template scsi_driver = { | |||
1661 | .eh_host_reset_handler = storvsc_host_reset_handler, | 1667 | .eh_host_reset_handler = storvsc_host_reset_handler, |
1662 | .proc_name = "storvsc_host", | 1668 | .proc_name = "storvsc_host", |
1663 | .eh_timed_out = storvsc_eh_timed_out, | 1669 | .eh_timed_out = storvsc_eh_timed_out, |
1670 | .slave_alloc = storvsc_device_alloc, | ||
1664 | .slave_configure = storvsc_device_configure, | 1671 | .slave_configure = storvsc_device_configure, |
1665 | .cmd_per_lun = 255, | 1672 | .cmd_per_lun = 255, |
1666 | .this_id = -1, | 1673 | .this_id = -1, |