]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned...
authorXingui Yang <yangxingui@huawei.com>
Tue, 2 Dec 2025 06:56:27 +0000 (14:56 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 3 Dec 2025 06:36:13 +0000 (01:36 -0500)
This reverts commit ab2068a6fb84751836a84c26ca72b3beb349619d.

When probing the exp-attached sata device, libsas/libata will issue a
hard reset in sas_probe_sata() -> ata_sas_async_probe(), then a
broadcast event will be received after the disk probe fails, and this
commit causes the probe will be re-executed on the disk, and a faulty
disk may get into an indefinite loop of probe.

Therefore, revert this commit, although it can fix some temporary issues
with disk probe failure.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Link: https://patch.msgid.link/20251202065627.140361-1-yangxingui@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_internal.h

index 6706f2be8d274bc8aeb4cfeb93a5b473cefe44a3..da5408c701cddf0112e495e69e0f6c93287936e8 100644 (file)
@@ -145,20 +145,6 @@ 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);
 }