From 08cb13e126accf21fd8f80301d80ed9ac14b1944 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 2 Jul 2005 12:22:01 -0400 Subject: [PATCH] --- yaml --- r: 5001 b: refs/heads/master c: eb1dd68bc897d4e5a5133bfffbd4777a0fe16c4c h: refs/heads/master i: 4999: e3a8f7bf6ab39454369d487629775b03b93082be v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi_transport_spi.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 979eccc51f85..2b0c8bec4331 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a40342e0e72a2ba89aaa9e6c9a9eceb04741b24 +refs/heads/master: eb1dd68bc897d4e5a5133bfffbd4777a0fe16c4c diff --git a/trunk/drivers/scsi/scsi_transport_spi.c b/trunk/drivers/scsi/scsi_transport_spi.c index 2918b9600db7..7670919a087a 100644 --- a/trunk/drivers/scsi/scsi_transport_spi.c +++ b/trunk/drivers/scsi/scsi_transport_spi.c @@ -795,7 +795,8 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer) } /* test width */ - if (i->f->set_width && spi_max_width(starget) && sdev->wdtr) { + if (i->f->set_width && spi_max_width(starget) && + scsi_device_wide(sdev)) { i->f->set_width(starget, 1); if (spi_dv_device_compare_inquiry(sreq, buffer, @@ -811,14 +812,14 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer) return; /* device can't handle synchronous */ - if (!sdev->ppr && !sdev->sdtr) + if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev)) return; /* see if the device has an echo buffer. If it does we can * do the SPI pattern write tests */ len = 0; - if (sdev->ppr) + if (scsi_device_dt(sdev)) len = spi_dv_device_get_echo_buffer(sreq, buffer); retry: @@ -828,9 +829,11 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer) DV_SET(period, spi_min_period(starget)); /* try QAS requests; this should be harmless to set if the * target supports it */ - DV_SET(qas, 1); + if (scsi_device_qas(sdev)) + DV_SET(qas, 1); /* Also try IU transfers */ - DV_SET(iu, 1); + if (scsi_device_ius(sdev)) + DV_SET(iu, 1); if (spi_min_period(starget) < 9) { /* This u320 (or u640). Ignore the coupled parameters * like DT and IU, but set the optional ones */