summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_internal.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:07 +0000
commit6b427072c86d5df3f3ee861826cfbd9f08306aff (patch)
treea0d639ae6079e84a6b0ff97c38f30fae8693a285 /drivers/scsi/libsas/sas_internal.h
parentAdding debian version 6.9.10-1. (diff)
downloadlinux-6b427072c86d5df3f3ee861826cfbd9f08306aff.tar.xz
linux-6b427072c86d5df3f3ee861826cfbd9f08306aff.zip
Merging upstream version 6.9.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/scsi/libsas/sas_internal.h')
-rw-r--r--drivers/scsi/libsas/sas_internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 3804aef165..164086c582 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -145,6 +145,20 @@ static inline void sas_fail_probe(struct domain_device *dev, const char *func, i
func, dev->parent ? "exp-attached" :
"direct-attached",
SAS_ADDR(dev->sas_addr), err);
+
+ /*
+ * If the device probe failed, the expander phy attached address
+ * needs to be reset so that the phy will not be treated as flutter
+ * in the next revalidation
+ */
+ if (dev->parent && !dev_is_expander(dev->dev_type)) {
+ struct sas_phy *phy = dev->phy;
+ struct domain_device *parent = dev->parent;
+ struct ex_phy *ex_phy = &parent->ex_dev.ex_phy[phy->number];
+
+ memset(ex_phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
+ }
+
sas_unregister_dev(dev->port, dev);
}