Skip to contentSkip to conversation

scsi: pm80xx: Set stopped phy's linkrate to Disabled

PATCH Applied Changyuan Lyu 3 participants 3 messages Jul 8, 2022 – Jul 14, 2022

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

PATCH 1/1 scsi: pm80xx: Set stopped phy's linkrate to Disabled

Negotiated link rate needs to be updated to Disabled when phy is stopped.

---
 drivers/scsi/pm8001/pm80xx_hwi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/scsi/pm8001/pm80xx_hwi.c +5 -1
index 01c5e8ff4cc5..303cd05fec50 100644
@@ -3723,8 +3723,12 @@ static int mpi_phy_stop_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
 	pm8001_dbg(pm8001_ha, MSG, "phy:0x%x status:0x%x\n",
 		   phyid, status);
 	if (status == PHY_STOP_SUCCESS ||
-		status == PHY_STOP_ERR_DEVICE_ATTACHED)
+		status == PHY_STOP_ERR_DEVICE_ATTACHED) {
 		phy->phy_state = PHY_LINK_DISABLE;
+		phy->sas_phy.phy->negotiated_linkrate = SAS_PHY_DISABLED;
+		phy->sas_phy.linkrate = SAS_PHY_DISABLED;
+	}
+
 	return 0;
 }
 
Signature · 1 line
2.37.0.rc0.161.g10f37bed90-goog
Acked-by Jack Wang on v1 1/1
#1 lore raw
Quoted 6 lines · Changyuan Lyu

Negotiated link rate needs to be updated to Disabled when phy is stopped.

Quoted 25 lines
---
 drivers/scsi/pm8001/pm80xx_hwi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/scsi/pm8001/pm80xx_hwi.c +5 -2
index 01c5e8ff4cc5..303cd05fec50 100644
@@ -3723,8 +3723,12 @@ static int mpi_phy_stop_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
        pm8001_dbg(pm8001_ha, MSG, "phy:0x%x status:0x%x\n",
                   phyid, status);
        if (status == PHY_STOP_SUCCESS ||
-               status == PHY_STOP_ERR_DEVICE_ATTACHED)
+               status == PHY_STOP_ERR_DEVICE_ATTACHED) {
                phy->phy_state = PHY_LINK_DISABLE;
+               phy->sas_phy.phy->negotiated_linkrate = SAS_PHY_DISABLED;
+               phy->sas_phy.linkrate = SAS_PHY_DISABLED;
+       }
+
        return 0;
 }
 
--

2.37.0.rc0.161.g10f37bed90-goog