Commit cdceba0e authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

[PATCH] SCSI: make DV check device capabilities

the SPI transport class DV should check the data we derive from the
inquiry to see if the device is capable of supporting wide/sync before
trying to validate the settings.
parent d87f2437
...@@ -490,7 +490,7 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer) ...@@ -490,7 +490,7 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer)
} }
/* test width */ /* test width */
if (i->f->set_width) { if (i->f->set_width && sdev->wdtr) {
i->f->set_width(sdev, 1); i->f->set_width(sdev, 1);
if (!spi_dv_device_compare_inquiry(sreq, buffer, if (!spi_dv_device_compare_inquiry(sreq, buffer,
...@@ -504,6 +504,10 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer) ...@@ -504,6 +504,10 @@ spi_dv_device_internal(struct scsi_request *sreq, u8 *buffer)
if (!i->f->set_period) if (!i->f->set_period)
return; return;
/* device can't handle synchronous */
if(!sdev->ppr && !sdev->sdtr)
return;
/* now set up to the maximum */ /* now set up to the maximum */
DV_SET(offset, 255); DV_SET(offset, 255);
DV_SET(period, 1); DV_SET(period, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment