diff options
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r-- | include/scsi/libsas.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 44b2f82a6eec..0c775fceb675 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -201,9 +201,14 @@ struct domain_device { | |||
201 | void *lldd_dev; | 201 | void *lldd_dev; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | struct sas_discovery_event { | ||
205 | struct work_struct work; | ||
206 | struct asd_sas_port *port; | ||
207 | }; | ||
208 | |||
204 | struct sas_discovery { | 209 | struct sas_discovery { |
205 | spinlock_t disc_event_lock; | 210 | spinlock_t disc_event_lock; |
206 | struct work_struct disc_work[DISC_NUM_EVENTS]; | 211 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; |
207 | unsigned long pending; | 212 | unsigned long pending; |
208 | u8 fanout_sas_addr[8]; | 213 | u8 fanout_sas_addr[8]; |
209 | u8 eeds_a[8]; | 214 | u8 eeds_a[8]; |
@@ -249,14 +254,19 @@ struct asd_sas_port { | |||
249 | void *lldd_port; /* not touched by the sas class code */ | 254 | void *lldd_port; /* not touched by the sas class code */ |
250 | }; | 255 | }; |
251 | 256 | ||
257 | struct asd_sas_event { | ||
258 | struct work_struct work; | ||
259 | struct asd_sas_phy *phy; | ||
260 | }; | ||
261 | |||
252 | /* The phy pretty much is controlled by the LLDD. | 262 | /* The phy pretty much is controlled by the LLDD. |
253 | * The class only reads those fields. | 263 | * The class only reads those fields. |
254 | */ | 264 | */ |
255 | struct asd_sas_phy { | 265 | struct asd_sas_phy { |
256 | /* private: */ | 266 | /* private: */ |
257 | /* protected by ha->event_lock */ | 267 | /* protected by ha->event_lock */ |
258 | struct work_struct port_events[PORT_NUM_EVENTS]; | 268 | struct asd_sas_event port_events[PORT_NUM_EVENTS]; |
259 | struct work_struct phy_events[PHY_NUM_EVENTS]; | 269 | struct asd_sas_event phy_events[PHY_NUM_EVENTS]; |
260 | 270 | ||
261 | unsigned long port_events_pending; | 271 | unsigned long port_events_pending; |
262 | unsigned long phy_events_pending; | 272 | unsigned long phy_events_pending; |
@@ -308,10 +318,15 @@ struct scsi_core { | |||
308 | int queue_thread_kill; | 318 | int queue_thread_kill; |
309 | }; | 319 | }; |
310 | 320 | ||
321 | struct sas_ha_event { | ||
322 | struct work_struct work; | ||
323 | struct sas_ha_struct *ha; | ||
324 | }; | ||
325 | |||
311 | struct sas_ha_struct { | 326 | struct sas_ha_struct { |
312 | /* private: */ | 327 | /* private: */ |
313 | spinlock_t event_lock; | 328 | spinlock_t event_lock; |
314 | struct work_struct ha_events[HA_NUM_EVENTS]; | 329 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; |
315 | unsigned long pending; | 330 | unsigned long pending; |
316 | 331 | ||
317 | struct scsi_core core; | 332 | struct scsi_core core; |
@@ -542,7 +557,7 @@ struct sas_task { | |||
542 | 557 | ||
543 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |
544 | { | 559 | { |
545 | extern kmem_cache_t *sas_task_cache; | 560 | extern struct kmem_cache *sas_task_cache; |
546 | struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); | 561 | struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); |
547 | 562 | ||
548 | if (task) { | 563 | if (task) { |
@@ -560,7 +575,7 @@ static inline struct sas_task *sas_alloc_task(gfp_t flags) | |||
560 | static inline void sas_free_task(struct sas_task *task) | 575 | static inline void sas_free_task(struct sas_task *task) |
561 | { | 576 | { |
562 | if (task) { | 577 | if (task) { |
563 | extern kmem_cache_t *sas_task_cache; | 578 | extern struct kmem_cache *sas_task_cache; |
564 | BUG_ON(!list_empty(&task->list)); | 579 | BUG_ON(!list_empty(&task->list)); |
565 | kmem_cache_free(sas_task_cache, task); | 580 | kmem_cache_free(sas_task_cache, task); |
566 | } | 581 | } |
@@ -631,6 +646,6 @@ void sas_unregister_dev(struct domain_device *); | |||
631 | 646 | ||
632 | void sas_init_dev(struct domain_device *); | 647 | void sas_init_dev(struct domain_device *); |
633 | 648 | ||
634 | void sas_task_abort(struct sas_task *task); | 649 | void sas_task_abort(struct work_struct *); |
635 | 650 | ||
636 | #endif /* _SASLIB_H_ */ | 651 | #endif /* _SASLIB_H_ */ |