diff options
author | Prakash, Sathya <sathya.prakash@lsi.com> | 2007-08-14 06:45:38 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:40:47 -0400 |
commit | 56af97ae477cf8c2983edf86db2559d6394ca860 (patch) | |
tree | 9e9f7d36be1e79c8254661229f6f02c9f33606b1 /drivers/message/fusion/mptsas.c | |
parent | f606f5718fa5a36e400000f91c44a5725b0f005d (diff) |
[SCSI] mpt fusion: Creation of mptsas.h header file
The data structure definitions from mptsas.c are moved to a new header
file mptsas.h
signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptsas.c')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 106 |
1 files changed, 1 insertions, 105 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index ffbf0e59200e..5951fe02ed4c 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -61,6 +61,7 @@ | |||
61 | 61 | ||
62 | #include "mptbase.h" | 62 | #include "mptbase.h" |
63 | #include "mptscsih.h" | 63 | #include "mptscsih.h" |
64 | #include "mptsas.h" | ||
64 | 65 | ||
65 | 66 | ||
66 | #define my_NAME "Fusion MPT SAS Host driver" | 67 | #define my_NAME "Fusion MPT SAS Host driver" |
@@ -96,111 +97,6 @@ static u8 mptsasMgmtCtx = MPT_MAX_PROTOCOL_DRIVERS; | |||
96 | 97 | ||
97 | static void mptsas_hotplug_work(struct work_struct *work); | 98 | static void mptsas_hotplug_work(struct work_struct *work); |
98 | 99 | ||
99 | struct mptsas_target_reset_event { | ||
100 | struct list_head list; | ||
101 | EVENT_DATA_SAS_DEVICE_STATUS_CHANGE sas_event_data; | ||
102 | u8 target_reset_issued; | ||
103 | }; | ||
104 | |||
105 | enum mptsas_hotplug_action { | ||
106 | MPTSAS_ADD_DEVICE, | ||
107 | MPTSAS_DEL_DEVICE, | ||
108 | MPTSAS_ADD_RAID, | ||
109 | MPTSAS_DEL_RAID, | ||
110 | MPTSAS_ADD_INACTIVE_VOLUME, | ||
111 | MPTSAS_IGNORE_EVENT, | ||
112 | }; | ||
113 | |||
114 | struct mptsas_hotplug_event { | ||
115 | struct work_struct work; | ||
116 | MPT_ADAPTER *ioc; | ||
117 | enum mptsas_hotplug_action event_type; | ||
118 | u64 sas_address; | ||
119 | u8 channel; | ||
120 | u8 id; | ||
121 | u32 device_info; | ||
122 | u16 handle; | ||
123 | u16 parent_handle; | ||
124 | u8 phy_id; | ||
125 | u8 phys_disk_num_valid; /* hrc (hidden raid component) */ | ||
126 | u8 phys_disk_num; /* hrc - unique index*/ | ||
127 | u8 hidden_raid_component; /* hrc - don't expose*/ | ||
128 | }; | ||
129 | |||
130 | struct mptsas_discovery_event { | ||
131 | struct work_struct work; | ||
132 | MPT_ADAPTER *ioc; | ||
133 | }; | ||
134 | |||
135 | /* | ||
136 | * SAS topology structures | ||
137 | * | ||
138 | * The MPT Fusion firmware interface spreads information about the | ||
139 | * SAS topology over many manufacture pages, thus we need some data | ||
140 | * structure to collect it and process it for the SAS transport class. | ||
141 | */ | ||
142 | |||
143 | struct mptsas_devinfo { | ||
144 | u16 handle; /* unique id to address this device */ | ||
145 | u16 handle_parent; /* unique id to address parent device */ | ||
146 | u16 handle_enclosure; /* enclosure identifier of the enclosure */ | ||
147 | u16 slot; /* physical slot in enclosure */ | ||
148 | u8 phy_id; /* phy number of parent device */ | ||
149 | u8 port_id; /* sas physical port this device | ||
150 | is assoc'd with */ | ||
151 | u8 id; /* logical target id of this device */ | ||
152 | u32 phys_disk_num; /* phys disk id, for csmi-ioctls */ | ||
153 | u8 channel; /* logical bus number of this device */ | ||
154 | u64 sas_address; /* WWN of this device, | ||
155 | SATA is assigned by HBA,expander */ | ||
156 | u32 device_info; /* bitfield detailed info about this device */ | ||
157 | }; | ||
158 | |||
159 | /* | ||
160 | * Specific details on ports, wide/narrow | ||
161 | */ | ||
162 | struct mptsas_portinfo_details{ | ||
163 | u16 num_phys; /* number of phys belong to this port */ | ||
164 | u64 phy_bitmask; /* TODO, extend support for 255 phys */ | ||
165 | struct sas_rphy *rphy; /* transport layer rphy object */ | ||
166 | struct sas_port *port; /* transport layer port object */ | ||
167 | struct scsi_target *starget; | ||
168 | struct mptsas_portinfo *port_info; | ||
169 | }; | ||
170 | |||
171 | struct mptsas_phyinfo { | ||
172 | u16 handle; /* unique id to address this */ | ||
173 | u8 phy_id; /* phy index */ | ||
174 | u8 port_id; /* firmware port identifier */ | ||
175 | u8 negotiated_link_rate; /* nego'd link rate for this phy */ | ||
176 | u8 hw_link_rate; /* hardware max/min phys link rate */ | ||
177 | u8 programmed_link_rate; /* programmed max/min phy link rate */ | ||
178 | u8 sas_port_add_phy; /* flag to request sas_port_add_phy*/ | ||
179 | struct mptsas_devinfo identify; /* point to phy device info */ | ||
180 | struct mptsas_devinfo attached; /* point to attached device info */ | ||
181 | struct sas_phy *phy; /* transport layer phy object */ | ||
182 | struct mptsas_portinfo *portinfo; | ||
183 | struct mptsas_portinfo_details * port_details; | ||
184 | }; | ||
185 | |||
186 | struct mptsas_portinfo { | ||
187 | struct list_head list; | ||
188 | u16 num_phys; /* number of phys */ | ||
189 | struct mptsas_phyinfo *phy_info; | ||
190 | }; | ||
191 | |||
192 | struct mptsas_enclosure { | ||
193 | u64 enclosure_logical_id; /* The WWN for the enclosure */ | ||
194 | u16 enclosure_handle; /* unique id to address this */ | ||
195 | u16 flags; /* details enclosure management */ | ||
196 | u16 num_slot; /* num slots */ | ||
197 | u16 start_slot; /* first slot */ | ||
198 | u8 start_id; /* starting logical target id */ | ||
199 | u8 start_channel; /* starting logical channel id */ | ||
200 | u8 sep_id; /* SEP device logical target id */ | ||
201 | u8 sep_channel; /* SEP channel logical channel id */ | ||
202 | }; | ||
203 | |||
204 | static void mptsas_print_phy_data(MPT_ADAPTER *ioc, | 100 | static void mptsas_print_phy_data(MPT_ADAPTER *ioc, |
205 | MPI_SAS_IO_UNIT0_PHY_DATA *phy_data) | 101 | MPI_SAS_IO_UNIT0_PHY_DATA *phy_data) |
206 | { | 102 | { |