aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-17 15:03:41 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-21 11:52:45 -0400
commit9872b81cf9f4b163e9c558d79e76b832c58a4814 (patch)
treeaf68f3cbe69f4f62f8e3916991de42ca63059e73 /drivers
parent598fa4b775d064d4656132c78d9a312eb1d2f91f (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_transport_spi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 654a34fb04c..00cfb40b5ef 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -833,7 +833,7 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
833 return; 833 return;
834 } 834 }
835 835
836 if (!scsi_device_wide(sdev)) { 836 if (!spi_support_wide(starget)) {
837 spi_max_width(starget) = 0; 837 spi_max_width(starget) = 0;
838 max_width = 0; 838 max_width = 0;
839 } 839 }
@@ -860,7 +860,7 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
860 return; 860 return;
861 861
862 /* device can't handle synchronous */ 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 return; 864 return;
865 865
866 /* len == -1 is the signal that we need to ascertain the 866 /* len == -1 is the signal that we need to ascertain the
@@ -876,13 +876,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
876 876
877 /* try QAS requests; this should be harmless to set if the 877 /* try QAS requests; this should be harmless to set if the
878 * target supports it */ 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 DV_SET(qas, 1); 880 DV_SET(qas, 1);
881 } else { 881 } else {
882 DV_SET(qas, 0); 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 /* This u320 (or u640). Set IU transfers */ 887 /* This u320 (or u640). Set IU transfers */
887 DV_SET(iu, 1); 888 DV_SET(iu, 1);
888 /* Then set the optional parameters */ 889 /* Then set the optional parameters */
@@ -902,7 +903,7 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
902 i->f->get_signalling(shost); 903 i->f->get_signalling(shost);
903 if (spi_signalling(shost) == SPI_SIGNAL_SE || 904 if (spi_signalling(shost) == SPI_SIGNAL_SE ||
904 spi_signalling(shost) == SPI_SIGNAL_HVD || 905 spi_signalling(shost) == SPI_SIGNAL_HVD ||
905 !scsi_device_dt(sdev)) { 906 !spi_support_dt(starget)) {
906 DV_SET(dt, 0); 907 DV_SET(dt, 0);
907 } else { 908 } else {
908 DV_SET(dt, 1); 909 DV_SET(dt, 1);