aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h11
-rw-r--r--include/scsi/sas.h8
2 files changed, 19 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 2517254b8403..af0a1deac930 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -405,6 +405,13 @@ static inline void sas_phy_disconnected(struct asd_sas_phy *phy)
405 phy->linkrate = SAS_LINK_RATE_UNKNOWN; 405 phy->linkrate = SAS_LINK_RATE_UNKNOWN;
406} 406}
407 407
408static inline unsigned int to_sas_gpio_od(int device, int bit)
409{
410 return 3 * device + bit;
411}
412
413int try_test_sas_gpio_gp_bit(unsigned int od, u8 *data, u8 index, u8 count);
414
408/* ---------- Tasks ---------- */ 415/* ---------- Tasks ---------- */
409/* 416/*
410 service_response | SAS_TASK_COMPLETE | SAS_TASK_UNDELIVERED | 417 service_response | SAS_TASK_COMPLETE | SAS_TASK_UNDELIVERED |
@@ -592,6 +599,10 @@ struct sas_domain_function_template {
592 599
593 /* Phy management */ 600 /* Phy management */
594 int (*lldd_control_phy)(struct asd_sas_phy *, enum phy_func, void *); 601 int (*lldd_control_phy)(struct asd_sas_phy *, enum phy_func, void *);
602
603 /* GPIO support */
604 int (*lldd_write_gpio)(struct sas_ha_struct *, u8 reg_type,
605 u8 reg_index, u8 reg_count, u8 *write_data);
595}; 606};
596 607
597extern int sas_register_ha(struct sas_ha_struct *); 608extern int sas_register_ha(struct sas_ha_struct *);
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index e9fd02281381..a3001add0c66 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -195,6 +195,14 @@ enum sas_open_rej_reason {
195 SAS_OREJ_RSVD_RETRY = 18, 195 SAS_OREJ_RSVD_RETRY = 18,
196}; 196};
197 197
198enum sas_gpio_reg_type {
199 SAS_GPIO_REG_CFG = 0,
200 SAS_GPIO_REG_RX = 1,
201 SAS_GPIO_REG_RX_GP = 2,
202 SAS_GPIO_REG_TX = 3,
203 SAS_GPIO_REG_TX_GP = 4,
204};
205
198struct dev_to_host_fis { 206struct dev_to_host_fis {
199 u8 fis_type; /* 0x34 */ 207 u8 fis_type; /* 0x34 */
200 u8 flags; 208 u8 flags;