Skip to contentSkip to conversation

Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"

PATCH Applied Xingui Yang 3 participants 4 messages Dec 2, 2025 – Dec 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"

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.

---
Changs to v1:
- Update commit message

---
 drivers/scsi/libsas/sas_internal.h | 14 --------------
 1 file changed, 14 deletions(-)
drivers/scsi/libsas/sas_internal.h +0 -14
index 6706f2be8d27..da5408c701cd 100644
@@ -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);
 }
 
Signature · 1 line
2.33.0
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Xingui Yang

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.

Quoted 5 lines

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

#3 lore raw
In reply to Xingui Yang
Quoted 9 lines · Xingui Yang

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.

[...]

Applied to 6.19/scsi-queue, thanks!

[1/1] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"

      https://git.kernel.org/mkp/scsi/c/278712d20bc8
Signature · 1 line
Martin K. Petersen