diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_port.c')
-rw-r--r-- | drivers/scsi/libsas/sas_port.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c index 253cdcf306a2..971c37ceecb4 100644 --- a/drivers/scsi/libsas/sas_port.c +++ b/drivers/scsi/libsas/sas_port.c | |||
@@ -181,9 +181,11 @@ void sas_deform_port(struct asd_sas_phy *phy) | |||
181 | 181 | ||
182 | /* ---------- SAS port events ---------- */ | 182 | /* ---------- SAS port events ---------- */ |
183 | 183 | ||
184 | void sas_porte_bytes_dmaed(void *data) | 184 | void sas_porte_bytes_dmaed(struct work_struct *work) |
185 | { | 185 | { |
186 | struct asd_sas_phy *phy = data; | 186 | struct asd_sas_event *ev = |
187 | container_of(work, struct asd_sas_event, work); | ||
188 | struct asd_sas_phy *phy = ev->phy; | ||
187 | 189 | ||
188 | sas_begin_event(PORTE_BYTES_DMAED, &phy->ha->event_lock, | 190 | sas_begin_event(PORTE_BYTES_DMAED, &phy->ha->event_lock, |
189 | &phy->port_events_pending); | 191 | &phy->port_events_pending); |
@@ -191,11 +193,13 @@ void sas_porte_bytes_dmaed(void *data) | |||
191 | sas_form_port(phy); | 193 | sas_form_port(phy); |
192 | } | 194 | } |
193 | 195 | ||
194 | void sas_porte_broadcast_rcvd(void *data) | 196 | void sas_porte_broadcast_rcvd(struct work_struct *work) |
195 | { | 197 | { |
198 | struct asd_sas_event *ev = | ||
199 | container_of(work, struct asd_sas_event, work); | ||
200 | struct asd_sas_phy *phy = ev->phy; | ||
196 | unsigned long flags; | 201 | unsigned long flags; |
197 | u32 prim; | 202 | u32 prim; |
198 | struct asd_sas_phy *phy = data; | ||
199 | 203 | ||
200 | sas_begin_event(PORTE_BROADCAST_RCVD, &phy->ha->event_lock, | 204 | sas_begin_event(PORTE_BROADCAST_RCVD, &phy->ha->event_lock, |
201 | &phy->port_events_pending); | 205 | &phy->port_events_pending); |
@@ -208,9 +212,11 @@ void sas_porte_broadcast_rcvd(void *data) | |||
208 | sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN); | 212 | sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN); |
209 | } | 213 | } |
210 | 214 | ||
211 | void sas_porte_link_reset_err(void *data) | 215 | void sas_porte_link_reset_err(struct work_struct *work) |
212 | { | 216 | { |
213 | struct asd_sas_phy *phy = data; | 217 | struct asd_sas_event *ev = |
218 | container_of(work, struct asd_sas_event, work); | ||
219 | struct asd_sas_phy *phy = ev->phy; | ||
214 | 220 | ||
215 | sas_begin_event(PORTE_LINK_RESET_ERR, &phy->ha->event_lock, | 221 | sas_begin_event(PORTE_LINK_RESET_ERR, &phy->ha->event_lock, |
216 | &phy->port_events_pending); | 222 | &phy->port_events_pending); |
@@ -218,9 +224,11 @@ void sas_porte_link_reset_err(void *data) | |||
218 | sas_deform_port(phy); | 224 | sas_deform_port(phy); |
219 | } | 225 | } |
220 | 226 | ||
221 | void sas_porte_timer_event(void *data) | 227 | void sas_porte_timer_event(struct work_struct *work) |
222 | { | 228 | { |
223 | struct asd_sas_phy *phy = data; | 229 | struct asd_sas_event *ev = |
230 | container_of(work, struct asd_sas_event, work); | ||
231 | struct asd_sas_phy *phy = ev->phy; | ||
224 | 232 | ||
225 | sas_begin_event(PORTE_TIMER_EVENT, &phy->ha->event_lock, | 233 | sas_begin_event(PORTE_TIMER_EVENT, &phy->ha->event_lock, |
226 | &phy->port_events_pending); | 234 | &phy->port_events_pending); |
@@ -228,9 +236,11 @@ void sas_porte_timer_event(void *data) | |||
228 | sas_deform_port(phy); | 236 | sas_deform_port(phy); |
229 | } | 237 | } |
230 | 238 | ||
231 | void sas_porte_hard_reset(void *data) | 239 | void sas_porte_hard_reset(struct work_struct *work) |
232 | { | 240 | { |
233 | struct asd_sas_phy *phy = data; | 241 | struct asd_sas_event *ev = |
242 | container_of(work, struct asd_sas_event, work); | ||
243 | struct asd_sas_phy *phy = ev->phy; | ||
234 | 244 | ||
235 | sas_begin_event(PORTE_HARD_RESET, &phy->ha->event_lock, | 245 | sas_begin_event(PORTE_HARD_RESET, &phy->ha->event_lock, |
236 | &phy->port_events_pending); | 246 | &phy->port_events_pending); |