All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
@ 2025-12-02  6:56 Xingui Yang
  2025-12-02 13:12 ` John Garry
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xingui Yang @ 2025-12-02  6:56 UTC (permalink / raw)
  To: john.g.garry, yanaijie, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, linuxarm, liyihang9, yangxingui,
	liuyonglong, kangfenglong

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>
---
Changs to v1:
- Update commit message
---
 drivers/scsi/libsas/sas_internal.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 6706f2be8d27..da5408c701cd 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -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);
 }
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
  2025-12-02  6:56 [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed" Xingui Yang
@ 2025-12-02 13:12 ` John Garry
  2025-12-03  6:36 ` Martin K. Petersen
  2025-12-09  3:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2025-12-02 13:12 UTC (permalink / raw)
  To: Xingui Yang, yanaijie, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, linuxarm, liyihang9, liuyonglong,
	kangfenglong

On 02/12/2025 06:56, Xingui Yang wrote:
> 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>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
  2025-12-02  6:56 [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed" Xingui Yang
  2025-12-02 13:12 ` John Garry
@ 2025-12-03  6:36 ` Martin K. Petersen
  2025-12-09  3:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-12-03  6:36 UTC (permalink / raw)
  To: Xingui Yang
  Cc: john.g.garry, yanaijie, jejb, martin.petersen, linux-scsi,
	linux-kernel, linuxarm, liyihang9, liuyonglong, kangfenglong


Xingui,

> This reverts commit ab2068a6fb84751836a84c26ca72b3beb349619d.

Applied to 6.19/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
  2025-12-02  6:56 [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed" Xingui Yang
  2025-12-02 13:12 ` John Garry
  2025-12-03  6:36 ` Martin K. Petersen
@ 2025-12-09  3:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-12-09  3:21 UTC (permalink / raw)
  To: john.g.garry, yanaijie, jejb, Xingui Yang
  Cc: Martin K . Petersen, linux-scsi, linux-kernel, linuxarm,
	liyihang9, liuyonglong, kangfenglong

On Tue, 02 Dec 2025 14:56:27 +0800, Xingui Yang wrote:

> 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

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-09  3:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-02  6:56 [PATCH v2] Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed" Xingui Yang
2025-12-02 13:12 ` John Garry
2025-12-03  6:36 ` Martin K. Petersen
2025-12-09  3:21 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.