diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libsas.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9c6e90829dbd..a0635b128d7a 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -203,6 +203,14 @@ static inline bool dev_is_expander(enum sas_device_type type) type == SAS_FANOUT_EXPANDER_DEVICE; } +static inline bool dev_parent_is_expander(struct domain_device *dev) +{ + if (!dev->parent) + return false; + + return dev_is_expander(dev->parent->dev_type); +} + static inline void INIT_SAS_WORK(struct sas_work *sw, void (*fn)(struct work_struct *)) { INIT_WORK(&sw->work, fn); |