aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/scsi/libsas.h19
-rw-r--r--include/scsi/scsi_transport_sas.h3
-rw-r--r--include/scsi/scsi_transport_spi.h1
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
326enum sas_ha_state {
327 SAS_HA_REGISTERED,
328 SAS_HA_UNREGISTERED
329};
330
326struct sas_ha_struct { 331struct 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
558static inline struct sas_task *sas_alloc_task(gfp_t flags) 567static inline struct sas_task *sas_alloc_task(gfp_t flags)
559{ 568{
@@ -612,6 +621,9 @@ struct sas_domain_function_template {
612extern int sas_register_ha(struct sas_ha_struct *); 621extern int sas_register_ha(struct sas_ha_struct *);
613extern int sas_unregister_ha(struct sas_ha_struct *); 622extern int sas_unregister_ha(struct sas_ha_struct *);
614 623
624int sas_set_phy_speed(struct sas_phy *phy,
625 struct sas_phy_linkrates *rates);
626int sas_phy_enable(struct sas_phy *phy, int enabled);
615int sas_phy_reset(struct sas_phy *phy, int hard_reset); 627int sas_phy_reset(struct sas_phy *phy, int hard_reset);
616extern int sas_queuecommand(struct scsi_cmnd *, 628extern 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
646void sas_init_dev(struct domain_device *); 658void sas_init_dev(struct domain_device *);
647 659
648void sas_task_abort(struct work_struct *); 660void sas_task_abort(struct sas_task *);
661int __sas_task_abort(struct sas_task *);
662int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
663int 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 {
54struct sas_phy { 54struct 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 *);
180extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); 182extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type);
181void sas_rphy_free(struct sas_rphy *); 183void sas_rphy_free(struct sas_rphy *);
182extern int sas_rphy_add(struct sas_rphy *); 184extern int sas_rphy_add(struct sas_rphy *);
185extern void sas_rphy_remove(struct sas_rphy *);
183extern void sas_rphy_delete(struct sas_rphy *); 186extern void sas_rphy_delete(struct sas_rphy *);
184extern int scsi_is_sas_rphy(const struct device *); 187extern 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)