diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2006-03-04 10:10:18 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-06 10:43:17 -0500 |
commit | 42ab03609cca4ef5079e248296f015650c626899 (patch) | |
tree | e81cfa54e34537ef4a3ee7363e123c5428800a1c /include/scsi | |
parent | dd9fbb52134693f1394a928c05d5f3cd3fdaf6e0 (diff) |
[PATCH] convert aic94xx over to using the sas transport end device
Begin introducing the concept of sas remote devices that have an rphy
embedded. The first one (this) is a simple end device. All that an
end device really does is have port mode page parameters contained.
The next and more complex piece will be expander remote devices.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_transport_sas.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 95e2132d485e..8fded431cf46 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -82,6 +82,10 @@ struct sas_rphy { | |||
82 | struct sas_identify identify; | 82 | struct sas_identify identify; |
83 | struct list_head list; | 83 | struct list_head list; |
84 | u32 scsi_target_id; | 84 | u32 scsi_target_id; |
85 | /* temporary expedient: mark the rphy as being contained | ||
86 | * within a type specific rphy | ||
87 | * FIXME: pull this out when everything uses the containers */ | ||
88 | unsigned contained:1; | ||
85 | }; | 89 | }; |
86 | 90 | ||
87 | #define dev_to_rphy(d) \ | 91 | #define dev_to_rphy(d) \ |
@@ -90,6 +94,19 @@ struct sas_rphy { | |||
90 | dev_to_rphy((cdev)->dev) | 94 | dev_to_rphy((cdev)->dev) |
91 | #define rphy_to_shost(rphy) \ | 95 | #define rphy_to_shost(rphy) \ |
92 | dev_to_shost((rphy)->dev.parent) | 96 | dev_to_shost((rphy)->dev.parent) |
97 | #define target_to_rphy(targ) \ | ||
98 | dev_to_rphy((targ)->dev.parent) | ||
99 | |||
100 | struct sas_end_device { | ||
101 | struct sas_rphy rphy; | ||
102 | /* flags */ | ||
103 | unsigned ready_led_meaning:1; | ||
104 | /* parameters */ | ||
105 | u16 I_T_nexus_loss_timeout; | ||
106 | u16 initiator_response_timeout; | ||
107 | }; | ||
108 | #define rphy_to_end_device(r) \ | ||
109 | container_of((r), struct sas_end_device, rphy) | ||
93 | 110 | ||
94 | 111 | ||
95 | /* The functions by which the transport class and the driver communicate */ | 112 | /* The functions by which the transport class and the driver communicate */ |
@@ -110,6 +127,7 @@ extern void sas_phy_delete(struct sas_phy *); | |||
110 | extern int scsi_is_sas_phy(const struct device *); | 127 | extern int scsi_is_sas_phy(const struct device *); |
111 | 128 | ||
112 | extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); | 129 | extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); |
130 | extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); | ||
113 | void sas_rphy_free(struct sas_rphy *); | 131 | void sas_rphy_free(struct sas_rphy *); |
114 | extern int sas_rphy_add(struct sas_rphy *); | 132 | extern int sas_rphy_add(struct sas_rphy *); |
115 | extern void sas_rphy_delete(struct sas_rphy *); | 133 | extern void sas_rphy_delete(struct sas_rphy *); |
@@ -118,5 +136,6 @@ extern int scsi_is_sas_rphy(const struct device *); | |||
118 | extern struct scsi_transport_template * | 136 | extern struct scsi_transport_template * |
119 | sas_attach_transport(struct sas_function_template *); | 137 | sas_attach_transport(struct sas_function_template *); |
120 | extern void sas_release_transport(struct scsi_transport_template *); | 138 | extern void sas_release_transport(struct scsi_transport_template *); |
139 | int sas_read_port_mode_page(struct scsi_device *); | ||
121 | 140 | ||
122 | #endif /* SCSI_TRANSPORT_SAS_H */ | 141 | #endif /* SCSI_TRANSPORT_SAS_H */ |