diff options
author | John Garry <john.garry@huawei.com> | 2019-04-12 10:57:55 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-04-16 00:55:00 +0200 |
commit | 085f104a83d565097644889bf1f6f1aa6d345cb5 (patch) | |
tree | c3c531c4172c6591a5914741384929ed742e4c80 /include/scsi | |
parent | scsi: libsas: Improve vague log in SAS rediscovery (diff) | |
download | linux-085f104a83d565097644889bf1f6f1aa6d345cb5.tar.xz linux-085f104a83d565097644889bf1f6f1aa6d345cb5.zip |
scsi: libsas: Inject revalidate event for root port event
According to the SAS spec, an expander device shall transmit BROADCAST
(CHANGE) from at least one phy in each expander port other than the
expander port that is the cause for transmitting BROADCAST (CHANGE).
As such, for when the link is lost for a root PHY attached to an expander
PHY, we get no broadcast event.
This causes an issue for libsas, in that we will not revalidate the domain
for these events.
As a solution, for when a root PHY is formed or deformed from a root port,
insert a broadcast event to trigger a domain revalidation.
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libsas.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index cfaaf1254211..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); |