summaryrefslogtreecommitdiff
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 56b2dba7d911..b08febec7895 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -224,6 +224,13 @@ struct sas_work {
struct work_struct work;
};
+/* Lots of code duplicates this in the SCSI tree, which can be factored out */
+static inline bool sas_dev_type_is_expander(enum sas_device_type type)
+{
+ return type == SAS_EDGE_EXPANDER_DEVICE ||
+ type == SAS_FANOUT_EXPANDER_DEVICE;
+}
+
static inline void INIT_SAS_WORK(struct sas_work *sw, void (*fn)(struct work_struct *))
{
INIT_WORK(&sw->work, fn);
@@ -245,9 +252,9 @@ static inline struct sas_discovery_event *to_sas_discovery_event(struct work_str
struct sas_discovery {
struct sas_discovery_event disc_work[DISC_NUM_EVENTS];
unsigned long pending;
- u8 fanout_sas_addr[8];
- u8 eeds_a[8];
- u8 eeds_b[8];
+ u8 fanout_sas_addr[SAS_ADDR_SIZE];
+ u8 eeds_a[SAS_ADDR_SIZE];
+ u8 eeds_b[SAS_ADDR_SIZE];
int max_level;
};