aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-05-06 19:05:20 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 16:54:32 -0400
commit62a8612972eaea804e1e42c63ee403cd4e14cc35 (patch)
tree15411e03ce3030849bb99e5d89874bb4032e32e6 /include
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
[SCSI] implement parameter limits in the SPI transport class
There's a basic need not to have parameters go under or over certain values when doing domain validation. The basic ones are max_offset, max_width and min_period This patch makes the transport class take and enforce these three limits. Currently they can be set by the user, although they could obviously be read from the HBA's on-board NVRAM area during slave_configure (if it has one). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_transport_spi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h
index 6dcf497bf46d..a30d6cd4c0e8 100644
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -27,8 +27,11 @@ struct scsi_transport_template;
27 27
28struct spi_transport_attrs { 28struct spi_transport_attrs {
29 int period; /* value in the PPR/SDTR command */ 29 int period; /* value in the PPR/SDTR command */
30 int min_period;
30 int offset; 31 int offset;
32 int max_offset;
31 unsigned int width:1; /* 0 - narrow, 1 - wide */ 33 unsigned int width:1; /* 0 - narrow, 1 - wide */
34 unsigned int max_width:1;
32 unsigned int iu:1; /* Information Units enabled */ 35 unsigned int iu:1; /* Information Units enabled */
33 unsigned int dt:1; /* DT clocking enabled */ 36 unsigned int dt:1; /* DT clocking enabled */
34 unsigned int qas:1; /* Quick Arbitration and Selection enabled */ 37 unsigned int qas:1; /* Quick Arbitration and Selection enabled */
@@ -63,8 +66,11 @@ struct spi_host_attrs {
63 66
64/* accessor functions */ 67/* accessor functions */
65#define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) 68#define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period)
69#define spi_min_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->min_period)
66#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) 70#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset)
71#define spi_max_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_offset)
67#define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) 72#define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width)
73#define spi_max_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_width)
68#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) 74#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu)
69#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) 75#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt)
70#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) 76#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas)