Skip to contentSkip to conversation

scsi: pm80xx: Set phy_attached to zero when device is gone

PATCH Applied Salomon Dushimirimana 2 participants 2 messages Mar 19, 2025 – Apr 3, 2025

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

PATCH 1/1 scsi: pm80xx: Set phy_attached to zero when device is gone

From: Igor Pylypiv <[email protected]>

When a fatal error occurs, a phy down event may not be received to set phy->phy_attached to zero.

---
 drivers/scsi/pm8001/pm8001_sas.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/pm8001/pm8001_sas.c +1 -0
index 183ce00aa671..f7067878b34f 100644
@@ -766,6 +766,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)
 			spin_lock_irqsave(&pm8001_ha->lock, flags);
 		}
 		PM8001_CHIP_DISP->dereg_dev_req(pm8001_ha, device_id);
+		pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached = 0;
 		pm8001_free_dev(pm8001_dev);
 	} else {
 		pm8001_dbg(pm8001_ha, DISC, "Found dev has gone.\n");
Signature · 1 line
2.49.0.rc1.451.g8f38331e32-goog
#1 lore raw

Salomon,

Quoted 2 lines

When a fatal error occurs, a phy down event may not be received to set phy->phy_attached to zero.

Applied to 6.15/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen