scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW
Subsystems (2)
PATCH 1/1 scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW
From: Xiang Chen <[email protected]>
If we fail to notify the phy up event then undo the RPM resume, as the phy up notify event handling pairs with that RPM resume.
Tested-by Yihang Li <[email protected]>
Reported-by Yihang Li <[email protected]>
Signed-off-by Xiang Chen <[email protected]>
Signed-off-by John Garry <[email protected]>
---
Please consider for 5.19, thanks!
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +8 -2
@@ -1563,9 +1563,15 @@ static irqreturn_t phy_up_v3_hw(int phy_no, struct hisi_hba *hisi_hba) phy->port_id = port_id; -/* Call pm_runtime_put_sync() with pairs in hisi_sas_phyup_pm_work() */ +/* +* Call pm_runtime_get_noresume() which pairs with +* hisi_sas_phyup_pm_work() -> pm_runtime_put_sync(). +* For failure call pm_runtime_put() as we are in a hardirq context. +*/ pm_runtime_get_noresume (dev); -hisi_sas_notify_phy_event (phy,HISI_PHYE_PHY_UP_PM ); + res =hisi_sas_notify_phy_event (phy,HISI_PHYE_PHY_UP_PM ); +if (!res) +pm_runtime_put (dev); res =IRQ_HANDLED ;
Signature · 1 line
2.26.2
Martin K. Petersen
AppliedJohn,
Quoted 2 lines
If we fail to notify the phy up event then undo the RPM resume, as the phy up notify event handling pairs with that RPM resume.
Applied to 5.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 6 lines · John Garry
From: Xiang Chen <[email protected]>
If we fail to notify the phy up event then undo the RPM resume, as the phy up notify event handling pairs with that RPM resume.
Applied to 5.19/scsi-queue, thanks!
[1/1] scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW
https://git.kernel.org/mkp/scsi/c/9b5387fe5af3
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering