Commit 9b5387fe authored by Xiang Chen's avatar Xiang Chen Committed by Martin K. Petersen

scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW

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.

Link: https://lore.kernel.org/r/1651839939-101188-1-git-send-email-john.garry@huawei.comReported-by: default avatarYihang Li <liyihang6@hisilicon.com>
Tested-by: default avatarYihang Li <liyihang6@hisilicon.com>
Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f304d35e
...@@ -1563,9 +1563,15 @@ static irqreturn_t phy_up_v3_hw(int phy_no, struct hisi_hba *hisi_hba) ...@@ -1563,9 +1563,15 @@ static irqreturn_t phy_up_v3_hw(int phy_no, struct hisi_hba *hisi_hba)
phy->port_id = port_id; 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); 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; res = IRQ_HANDLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment