You need to sign in or sign up before continuing.
提交 308d1dc6 编写于 作者: H Huazhong Tan 提交者: Xie XiuQi

net: hns3: fixes duplicate reset interrupt issue for revision 0x20

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

For revision 0x20, the reset interrupt can only be cleared after
hardware reset has finished.

So this patch fixes it by clear the interrupt source register
when hardware reset done for revision 0x20.

Feature or Bugfix:Bugfix
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 3738ed7d
......@@ -3142,11 +3142,15 @@ enum hnae3_reset_type hclge_get_reset_level(struct hclge_dev *hdev,
static void hclge_clear_reset_cause(struct hclge_dev *hdev)
{
bool irq_en = false;
u32 clearval = 0;
switch (hdev->reset_type) {
case HNAE3_IMP_RESET:
/* fall through */
clearval = BIT(HCLGE_VECTOR0_IMPRESET_INT_B);
irq_en = true;
break;
case HNAE3_GLOBAL_RESET:
clearval = BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B);
irq_en = true;
break;
default:
......@@ -3156,6 +3160,13 @@ static void hclge_clear_reset_cause(struct hclge_dev *hdev)
if (!irq_en)
return;
/* For revision 0x20, the reset interrupt source
* can only be cleared after hardware reset done
*/
if (hdev->pdev->revision == 0x20)
hclge_write_dev(&hdev->hw, HCLGE_MISC_RESET_STS_REG,
clearval);
hclge_enable_vector(&hdev->misc_vector, true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册