Commit b4324bc3 authored by James Bottomley's avatar James Bottomley Committed by Linus Torvalds

[PATCH] Add Domain Validation to the SPI transport class

Domain Validation is a fairly essential element to the SCSI Parallel
Interface (although if you look very few drivers actually do it).  The
premise is that the Parallel Bus, being a transmission line, might not
be correctly tuned to the transfers you want do perform.  DV probes the
parameters of the transport until it finds a setting that works (for the
interested, see http://www.t10.org/ftp/t10/drafts/sdv/sdv-r08b.pdf)

The current code employs rather simplistic DV heuristics, although those
can be improved over time.  The change in scsi_scan.c is so that DV may
be done easily from the slave_configure routine, which is the most
natural place to begin.
parent 002653d2
...@@ -643,6 +643,10 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) ...@@ -643,6 +643,10 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
if (*bflags & BLIST_USE_10_BYTE_MS) if (*bflags & BLIST_USE_10_BYTE_MS)
sdev->use_10_for_ms = 1; sdev->use_10_for_ms = 1;
/* set the device running here so that slave configure
* may do I/O */
scsi_device_set_state(sdev, SDEV_RUNNING);
if(sdev->host->hostt->slave_configure) if(sdev->host->hostt->slave_configure)
sdev->host->hostt->slave_configure(sdev); sdev->host->hostt->slave_configure(sdev);
......
This diff is collapsed.
...@@ -35,6 +35,7 @@ struct spi_transport_attrs { ...@@ -35,6 +35,7 @@ struct spi_transport_attrs {
unsigned int rd_strm:1; /* Read streaming enabled */ unsigned int rd_strm:1; /* Read streaming enabled */
unsigned int rti:1; /* Retain Training Information */ unsigned int rti:1; /* Retain Training Information */
unsigned int pcomp_en:1;/* Precompensation enabled */ unsigned int pcomp_en:1;/* Precompensation enabled */
unsigned int dv_pending:1; /* Internal flag */
}; };
/* accessor functions */ /* accessor functions */
...@@ -89,5 +90,7 @@ struct spi_function_template { ...@@ -89,5 +90,7 @@ struct spi_function_template {
struct scsi_transport_template *spi_attach_transport(struct spi_function_template *); struct scsi_transport_template *spi_attach_transport(struct spi_function_template *);
void spi_release_transport(struct scsi_transport_template *); void spi_release_transport(struct scsi_transport_template *);
void spi_schedule_dv_device(struct scsi_device *);
void spi_dv_device(struct scsi_device *);
#endif /* SCSI_TRANSPORT_SPI_H */ #endif /* SCSI_TRANSPORT_SPI_H */
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