From: Xingui Yang yangxingui@huawei.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6J2FQ CVE: NA
-----------------------------------------
The channel int0 flag is not cleared when exit interrupt, and the OOB interrupt is triggered by other PHYs. The previously uncleared interrupt will continues to be triggered as follows:
hisi_sas_v3_hw 0000:b4:02.0: phydown: phy2 phy_state=0xfb hisi_sas_v3_hw 0000:b4:02.0: ignore flutter phy2 down hisi_sas_v3_hw 0000:b4:02.0: phy2 OOB ready hisi_sas_v3_hw 0000:b4:02.0: phy2 phy_attached! hisi_sas_v3_hw 0000:b4:02.0: phyup: phy2 link_rate=10(sata)
hisi_sas_v3_hw 0000:b4:02.0: phydown: phy3 phy_state=0xf7 hisi_sas_v3_hw 0000:b4:02.0: ignore flutter phy3 down hisi_sas_v3_hw 0000:b4:02.0: phy2 OOB ready hisi_sas_v3_hw 0000:b4:02.0: phy2 phy_attached! hisi_sas_v3_hw 0000:b4:02.0: phy3 OOB ready hisi_sas_v3_hw 0000:b4:02.0: phy3 phy_attached!
So clear interrupt status when exiting channel int0 for v3 hw.
Signed-off-by: Xingui Yang yangxingui@huawei.com Reviewed-by: kang fenglong kangfenglong@huawei.com Signed-off-by: Yongqiang Liu liuyongqiang13@huawei.com --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 9d840538aea8..5e2488fd2466 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -1937,7 +1937,7 @@ static void handle_chl_int0_v3_hw(struct hisi_hba *hisi_hba, int phy_no)
dev_dbg(dev, "phy%d OOB ready\n", phy_no); if (phy->phy_attached) - return; + goto out;
if (!timer_pending(&phy->timer)) { phy->timer.function = wait_phyup_timedout_v3_hw; @@ -1947,6 +1947,7 @@ static void handle_chl_int0_v3_hw(struct hisi_hba *hisi_hba, int phy_no) } }
+out: hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, irq_value0 & (~CHL_INT0_SL_RX_BCST_ACK_MSK) & (~CHL_INT0_SL_PHY_ENABLE_MSK)