diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2006-07-02 12:10:18 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-07-09 10:06:24 -0400 |
commit | c9fefeb26457b87f4a767faefcf77321bb90db52 (patch) | |
tree | 4b961b944e3cd51581c832134eccc4f6d4c4eef7 /include/scsi | |
parent | 24f6d2fd314f8580fcfd96391ce9689727d55572 (diff) |
[SCSI] scsi_transport_sas: add unindexed ports
Some SAS HBAs don't want to go to the trouble of tracking port numbers,
so they'd simply like to say "add this port and give it a number".
This is especially beneficial from the hotplug point of view, since
tracking ports and the available number space can be a real pain.
The current implementation uses an incrementing number per expander to
add the port on. However, since there can never be more ports than
there are phys, a later implementation will try to be more intelligent
about this.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_transport_sas.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index e3c503cd175e..f5772ff61d0d 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -106,6 +106,7 @@ struct sas_end_device { | |||
106 | 106 | ||
107 | struct sas_expander_device { | 107 | struct sas_expander_device { |
108 | int level; | 108 | int level; |
109 | int next_port_id; | ||
109 | 110 | ||
110 | #define SAS_EXPANDER_VENDOR_ID_LEN 8 | 111 | #define SAS_EXPANDER_VENDOR_ID_LEN 8 |
111 | char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; | 112 | char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; |
@@ -127,7 +128,7 @@ struct sas_expander_device { | |||
127 | struct sas_port { | 128 | struct sas_port { |
128 | struct device dev; | 129 | struct device dev; |
129 | 130 | ||
130 | u8 port_identifier; | 131 | int port_identifier; |
131 | int num_phys; | 132 | int num_phys; |
132 | 133 | ||
133 | /* the other end of the link */ | 134 | /* the other end of the link */ |
@@ -168,6 +169,7 @@ extern void sas_rphy_delete(struct sas_rphy *); | |||
168 | extern int scsi_is_sas_rphy(const struct device *); | 169 | extern int scsi_is_sas_rphy(const struct device *); |
169 | 170 | ||
170 | struct sas_port *sas_port_alloc(struct device *, int); | 171 | struct sas_port *sas_port_alloc(struct device *, int); |
172 | struct sas_port *sas_port_alloc_num(struct device *); | ||
171 | int sas_port_add(struct sas_port *); | 173 | int sas_port_add(struct sas_port *); |
172 | void sas_port_free(struct sas_port *); | 174 | void sas_port_free(struct sas_port *); |
173 | void sas_port_delete(struct sas_port *); | 175 | void sas_port_delete(struct sas_port *); |