aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-09-06 18:36:13 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-07 13:41:16 -0400
commit88edf74610bd894b93438f389688bc8b4a2d3414 (patch)
tree5f22ad465f07a8eda5576185db2e24ac7797d68a /include/scsi
parentb4620233d6a3510564c561a5a2a365a1d8a34b68 (diff)
[SCSI] SAS: consolidate linkspeed definitions
At the moment we have two separate linkspeed enumerations covering roughly the same values. This patch consolidates on a single one enum sas_linkspeed in scsi_transport_sas.h and uses it everywhere in the aic94xx driver. Eventually I'll get around to removing the duplicated fields in asd_sas_phy and sas_phy ... Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h14
-rw-r--r--include/scsi/sas.h14
-rw-r--r--include/scsi/scsi_transport_sas.h26
3 files changed, 24 insertions, 30 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 72acdabe7f80..8d91313dd888 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -114,7 +114,7 @@ struct ex_phy {
114 enum ex_phy_state phy_state; 114 enum ex_phy_state phy_state;
115 115
116 enum sas_dev_type attached_dev_type; 116 enum sas_dev_type attached_dev_type;
117 enum sas_phy_linkrate linkrate; 117 enum sas_linkrate linkrate;
118 118
119 u8 attached_sata_host:1; 119 u8 attached_sata_host:1;
120 u8 attached_sata_dev:1; 120 u8 attached_sata_dev:1;
@@ -170,9 +170,9 @@ struct sata_device {
170struct domain_device { 170struct domain_device {
171 enum sas_dev_type dev_type; 171 enum sas_dev_type dev_type;
172 172
173 enum sas_phy_linkrate linkrate; 173 enum sas_linkrate linkrate;
174 enum sas_phy_linkrate min_linkrate; 174 enum sas_linkrate min_linkrate;
175 enum sas_phy_linkrate max_linkrate; 175 enum sas_linkrate max_linkrate;
176 176
177 int pathways; 177 int pathways;
178 178
@@ -220,7 +220,7 @@ struct asd_sas_port {
220 struct domain_device *port_dev; 220 struct domain_device *port_dev;
221 spinlock_t dev_list_lock; 221 spinlock_t dev_list_lock;
222 struct list_head dev_list; 222 struct list_head dev_list;
223 enum sas_phy_linkrate linkrate; 223 enum sas_linkrate linkrate;
224 224
225 struct sas_phy *phy; 225 struct sas_phy *phy;
226 struct work_struct work; 226 struct work_struct work;
@@ -276,7 +276,7 @@ struct asd_sas_phy {
276 enum sas_phy_type type; 276 enum sas_phy_type type;
277 enum sas_phy_role role; 277 enum sas_phy_role role;
278 enum sas_oob_mode oob_mode; 278 enum sas_oob_mode oob_mode;
279 enum sas_phy_linkrate linkrate; 279 enum sas_linkrate linkrate;
280 280
281 u8 *sas_addr; /* must be set */ 281 u8 *sas_addr; /* must be set */
282 u8 attached_sas_addr[SAS_ADDR_SIZE]; /* class:RO, driver: R/W */ 282 u8 attached_sas_addr[SAS_ADDR_SIZE]; /* class:RO, driver: R/W */
@@ -368,7 +368,7 @@ void sas_hash_addr(u8 *hashed, const u8 *sas_addr);
368static inline void sas_phy_disconnected(struct asd_sas_phy *phy) 368static inline void sas_phy_disconnected(struct asd_sas_phy *phy)
369{ 369{
370 phy->oob_mode = OOB_NOT_CONNECTED; 370 phy->oob_mode = OOB_NOT_CONNECTED;
371 phy->linkrate = PHY_LINKRATE_NONE; 371 phy->linkrate = SAS_LINK_RATE_UNKNOWN;
372} 372}
373 373
374/* ---------- Tasks ---------- */ 374/* ---------- Tasks ---------- */
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index 752853a113dc..9c8a5b91ae64 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -102,20 +102,6 @@ enum sas_dev_type {
102 SATA_PM_PORT= 8, 102 SATA_PM_PORT= 8,
103}; 103};
104 104
105enum sas_phy_linkrate {
106 PHY_LINKRATE_NONE = 0,
107 PHY_LINKRATE_UNKNOWN = 0,
108 PHY_DISABLED,
109 PHY_RESET_PROBLEM,
110 PHY_SPINUP_HOLD,
111 PHY_PORT_SELECTOR,
112 PHY_LINKRATE_1_5 = 0x08,
113 PHY_LINKRATE_G1 = PHY_LINKRATE_1_5,
114 PHY_LINKRATE_3 = 0x09,
115 PHY_LINKRATE_G2 = PHY_LINKRATE_3,
116 PHY_LINKRATE_6 = 0x0A,
117};
118
119/* Partly from IDENTIFY address frame. */ 105/* Partly from IDENTIFY address frame. */
120enum sas_proto { 106enum sas_proto {
121 SATA_PROTO = 1, 107 SATA_PROTO = 1,
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index eeb2200de855..87de518960c1 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -24,15 +24,23 @@ enum sas_protocol {
24}; 24};
25 25
26enum sas_linkrate { 26enum sas_linkrate {
27 SAS_LINK_RATE_UNKNOWN, 27 /* These Values are defined in the SAS standard */
28 SAS_PHY_DISABLED, 28 SAS_LINK_RATE_UNKNOWN = 0,
29 SAS_LINK_RATE_FAILED, 29 SAS_PHY_DISABLED = 1,
30 SAS_SATA_SPINUP_HOLD, 30 SAS_PHY_RESET_PROBLEM = 2,
31 SAS_SATA_PORT_SELECTOR, 31 SAS_SATA_SPINUP_HOLD = 3,
32 SAS_LINK_RATE_1_5_GBPS, 32 SAS_SATA_PORT_SELECTOR = 4,
33 SAS_LINK_RATE_3_0_GBPS, 33 SAS_PHY_RESET_IN_PROGRESS = 5,
34 SAS_LINK_RATE_6_0_GBPS, 34 SAS_LINK_RATE_1_5_GBPS = 8,
35 SAS_LINK_VIRTUAL, 35 SAS_LINK_RATE_G1 = SAS_LINK_RATE_1_5_GBPS,
36 SAS_LINK_RATE_3_0_GBPS = 9,
37 SAS_LINK_RATE_G2 = SAS_LINK_RATE_3_0_GBPS,
38 SAS_LINK_RATE_6_0_GBPS = 10,
39 /* These are virtual to the transport class and may never
40 * be signalled normally since the standard defined field
41 * is only 4 bits */
42 SAS_LINK_RATE_FAILED = 0x10,
43 SAS_PHY_VIRTUAL = 0x11,
36}; 44};
37 45
38struct sas_identify { 46struct sas_identify {