Commit f3fa4a94 authored by Shiju Jose's avatar Shiju Jose Committed by David S. Miller

net: hns3: re-enable error interrupts on hw reset

This patch adds calling hclge_hw_error_set_state function
to re-enable the error interrupts those will be disabled on
the hw reset.
Signed-off-by: default avatarShiju Jose <shiju.jose@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98da4027
......@@ -540,7 +540,7 @@ static int hclge_config_ppp_hw_err_int(struct hclge_dev *hdev, bool en)
return ret;
}
int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en)
static int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en)
{
struct device *dev = &hdev->pdev->dev;
struct hclge_desc desc;
......
......@@ -59,6 +59,5 @@ struct hclge_hw_error {
};
int hclge_hw_error_set_state(struct hclge_dev *hdev, bool state);
int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en);
pci_ers_result_t hclge_process_ras_hw_error(struct hnae3_ae_dev *ae_dev);
#endif
......@@ -7269,7 +7269,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
ret = hclge_hw_error_set_state(hdev, true);
if (ret) {
dev_err(&pdev->dev,
"hw error interrupts enable failed, ret =%d\n", ret);
"fail(%d) to enable hw error interrupts\n", ret);
goto err_mdiobus_unreg;
}
......@@ -7405,11 +7405,15 @@ static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev)
return ret;
}
/* Re-enable the TM hw error interrupts because
* they get disabled on core/global reset.
/* Re-enable the hw error interrupts because
* the interrupts get disabled on core/global reset.
*/
if (hclge_config_tm_hw_err_int(hdev, true))
dev_err(&pdev->dev, "failed to enable TM hw error interrupts\n");
ret = hclge_hw_error_set_state(hdev, true);
if (ret) {
dev_err(&pdev->dev,
"fail(%d) to re-enable HNS hw error interrupts\n", ret);
return ret;
}
hclge_reset_vport_state(hdev);
......
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