提交 3a429d5a 编写于 作者: J John Garry 提交者: Martin K. Petersen

hisi_sas: fix v2 hw multiple SATA disk issue

Intermittently it is found that when multiple SATA disks are directly
connected to the host that some disks are not detected.  The problem is
that all set bitfields in ENT_INT_SRC1 are cleared for all phys in
sata_int_v2_hw() - it should clear the set bit for the phy being
serviced.

Also unnecessary double-write to ENT_INT_SRC1 and ENT_INT_SRC_MSK1 is
removed (remaining writes are done at end label).
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Reviewed-by: NZhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 75249268
...@@ -2003,12 +2003,10 @@ static irqreturn_t sata_int_v2_hw(int irq_no, void *p) ...@@ -2003,12 +2003,10 @@ static irqreturn_t sata_int_v2_hw(int irq_no, void *p)
hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, ent_msk | 1 << phy_no); hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, ent_msk | 1 << phy_no);
ent_int = hisi_sas_read32(hisi_hba, ENT_INT_SRC1); ent_int = hisi_sas_read32(hisi_hba, ENT_INT_SRC1);
ent_tmp = ent_int; ent_tmp = ent_int & (1 << (ENT_INT_SRC1_D2H_FIS_CH1_OFF * phy_no));
ent_int >>= ENT_INT_SRC1_D2H_FIS_CH1_OFF * (phy_no % 4); ent_int >>= ENT_INT_SRC1_D2H_FIS_CH1_OFF * (phy_no % 4);
if ((ent_int & ENT_INT_SRC1_D2H_FIS_CH0_MSK) == 0) { if ((ent_int & ENT_INT_SRC1_D2H_FIS_CH0_MSK) == 0) {
dev_warn(dev, "sata int: phy%d did not receive FIS\n", phy_no); dev_warn(dev, "sata int: phy%d did not receive FIS\n", phy_no);
hisi_sas_write32(hisi_hba, ENT_INT_SRC1, ent_tmp);
hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, ent_msk);
res = IRQ_NONE; res = IRQ_NONE;
goto end; goto end;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册