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

scsi_transport_spi: use spi target settings instead of inquiry data for DV

Right at the moment, we carefully set up the spi_support_xx in the
device configuration routines, but then we never actually use the
results: we rely on the inquiry strings. If we're going to allow
overrides to the inquiry data, we have to rely on our own internal
settings.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

+6 -5
+6 -5
drivers/scsi/scsi_transport_spi.c
··· 833 833 return; 834 834 } 835 835 836 - if (!scsi_device_wide(sdev)) { 836 + if (!spi_support_wide(starget)) { 837 837 spi_max_width(starget) = 0; 838 838 max_width = 0; 839 839 } ··· 860 860 return; 861 861 862 862 /* device can't handle synchronous */ 863 - if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev)) 863 + if (!spi_support_sync(starget) && !spi_support_dt(starget)) 864 864 return; 865 865 866 866 /* len == -1 is the signal that we need to ascertain the ··· 876 876 877 877 /* try QAS requests; this should be harmless to set if the 878 878 * target supports it */ 879 - if (scsi_device_qas(sdev) && spi_max_qas(starget)) { 879 + if (spi_support_qas(starget) && spi_max_qas(starget)) { 880 880 DV_SET(qas, 1); 881 881 } else { 882 882 DV_SET(qas, 0); 883 883 } 884 884 885 - if (scsi_device_ius(sdev) && spi_max_iu(starget) && min_period < 9) { 885 + if (spi_support_ius(starget) && spi_max_iu(starget) && 886 + min_period < 9) { 886 887 /* This u320 (or u640). Set IU transfers */ 887 888 DV_SET(iu, 1); 888 889 /* Then set the optional parameters */ ··· 903 902 i->f->get_signalling(shost); 904 903 if (spi_signalling(shost) == SPI_SIGNAL_SE || 905 904 spi_signalling(shost) == SPI_SIGNAL_HVD || 906 - !scsi_device_dt(sdev)) { 905 + !spi_support_dt(starget)) { 907 906 DV_SET(dt, 0); 908 907 } else { 909 908 DV_SET(dt, 1);