diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/libsas.h | 19 | ||||
-rw-r--r-- | include/scsi/scsi_transport_sas.h | 3 | ||||
-rw-r--r-- | include/scsi/scsi_transport_spi.h | 1 |
3 files changed, 21 insertions, 2 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0689e004a281..ad0182ef7809 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -323,12 +323,20 @@ struct sas_ha_event { | |||
323 | struct sas_ha_struct *ha; | 323 | struct sas_ha_struct *ha; |
324 | }; | 324 | }; |
325 | 325 | ||
326 | enum sas_ha_state { | ||
327 | SAS_HA_REGISTERED, | ||
328 | SAS_HA_UNREGISTERED | ||
329 | }; | ||
330 | |||
326 | struct sas_ha_struct { | 331 | struct sas_ha_struct { |
327 | /* private: */ | 332 | /* private: */ |
328 | spinlock_t event_lock; | 333 | spinlock_t event_lock; |
329 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; | 334 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; |
330 | unsigned long pending; | 335 | unsigned long pending; |
331 | 336 | ||
337 | enum sas_ha_state state; | ||
338 | spinlock_t state_lock; | ||
339 | |||
332 | struct scsi_core core; | 340 | struct scsi_core core; |
333 | 341 | ||
334 | /* public: */ | 342 | /* public: */ |
@@ -553,7 +561,8 @@ struct sas_task { | |||
553 | #define SAS_TASK_STATE_PENDING 1 | 561 | #define SAS_TASK_STATE_PENDING 1 |
554 | #define SAS_TASK_STATE_DONE 2 | 562 | #define SAS_TASK_STATE_DONE 2 |
555 | #define SAS_TASK_STATE_ABORTED 4 | 563 | #define SAS_TASK_STATE_ABORTED 4 |
556 | #define SAS_TASK_INITIATOR_ABORTED 8 | 564 | #define SAS_TASK_NEED_DEV_RESET 8 |
565 | #define SAS_TASK_AT_INITIATOR 16 | ||
557 | 566 | ||
558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 567 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |
559 | { | 568 | { |
@@ -612,6 +621,9 @@ struct sas_domain_function_template { | |||
612 | extern int sas_register_ha(struct sas_ha_struct *); | 621 | extern int sas_register_ha(struct sas_ha_struct *); |
613 | extern int sas_unregister_ha(struct sas_ha_struct *); | 622 | extern int sas_unregister_ha(struct sas_ha_struct *); |
614 | 623 | ||
624 | int sas_set_phy_speed(struct sas_phy *phy, | ||
625 | struct sas_phy_linkrates *rates); | ||
626 | int sas_phy_enable(struct sas_phy *phy, int enabled); | ||
615 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 627 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
616 | extern int sas_queuecommand(struct scsi_cmnd *, | 628 | extern int sas_queuecommand(struct scsi_cmnd *, |
617 | void (*scsi_done)(struct scsi_cmnd *)); | 629 | void (*scsi_done)(struct scsi_cmnd *)); |
@@ -645,6 +657,9 @@ void sas_unregister_dev(struct domain_device *); | |||
645 | 657 | ||
646 | void sas_init_dev(struct domain_device *); | 658 | void sas_init_dev(struct domain_device *); |
647 | 659 | ||
648 | void sas_task_abort(struct work_struct *); | 660 | void sas_task_abort(struct sas_task *); |
661 | int __sas_task_abort(struct sas_task *); | ||
662 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); | ||
663 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); | ||
649 | 664 | ||
650 | #endif /* _SASLIB_H_ */ | 665 | #endif /* _SASLIB_H_ */ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 59633a82de47..9aedc19820b0 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -54,6 +54,7 @@ struct sas_identify { | |||
54 | struct sas_phy { | 54 | struct sas_phy { |
55 | struct device dev; | 55 | struct device dev; |
56 | int number; | 56 | int number; |
57 | int enabled; | ||
57 | 58 | ||
58 | /* phy identification */ | 59 | /* phy identification */ |
59 | struct sas_identify identify; | 60 | struct sas_identify identify; |
@@ -163,6 +164,7 @@ struct sas_function_template { | |||
163 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); | 164 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); |
164 | int (*get_bay_identifier)(struct sas_rphy *); | 165 | int (*get_bay_identifier)(struct sas_rphy *); |
165 | int (*phy_reset)(struct sas_phy *, int); | 166 | int (*phy_reset)(struct sas_phy *, int); |
167 | int (*phy_enable)(struct sas_phy *, int); | ||
166 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); | 168 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); |
167 | }; | 169 | }; |
168 | 170 | ||
@@ -180,6 +182,7 @@ extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); | |||
180 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); | 182 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); |
181 | void sas_rphy_free(struct sas_rphy *); | 183 | void sas_rphy_free(struct sas_rphy *); |
182 | extern int sas_rphy_add(struct sas_rphy *); | 184 | extern int sas_rphy_add(struct sas_rphy *); |
185 | extern void sas_rphy_remove(struct sas_rphy *); | ||
183 | extern void sas_rphy_delete(struct sas_rphy *); | 186 | extern void sas_rphy_delete(struct sas_rphy *); |
184 | extern int scsi_is_sas_rphy(const struct device *); | 187 | extern int scsi_is_sas_rphy(const struct device *); |
185 | 188 | ||
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index da180f738477..286e9628ed8b 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -85,6 +85,7 @@ struct spi_host_attrs { | |||
85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) | 85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) |
86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) | 86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) |
87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) | 87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) |
88 | #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) | ||
88 | 89 | ||
89 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) | 90 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) |
90 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) | 91 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) |