summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
diff options
context:
space:
mode:
authorJiaran Zhang <zhangjiaran@huawei.com>2021-06-07 14:18:10 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-08 00:00:37 +0300
commitd991452dd7900cf152ffb43db3b1d385e1a01579 (patch)
treefdeb20617347ac51c1367740f628222e9ee16c78 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
parentca4e2b94eb98db8472a6cb5b47147e079659dc9c (diff)
downloadlinux-d991452dd7900cf152ffb43db3b1d385e1a01579.tar.xz
net: hns3: add a separate error handling task
Error handling and recovery logic are intertwined. Error handling (i.e. error identification, clearing error sources and initiation of recovery) is done in context of reset task. If certain hardware errors get delivered during driver init time, which can cause driver init/loading to fail. Introduce a separate error handling task to ensure below: 1. Reset logic remains independent of the error handling logic. 2. Add the hclge_errhand_task_schedule to schedule error recovery tasks, This will ensure that common misellaneous MSI-X interrupt are re-enabled quickly. Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
index 8223d699cd94..f125aa425872 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
@@ -1940,8 +1940,8 @@ int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
if (!test_bit(HCLGE_STATE_SERVICE_INITED, &hdev->state)) {
dev_err(dev,
- "Can't handle - MSIx error reported during dev init\n");
- return 0;
+ "failed to handle msix error during dev init\n");
+ return -EAGAIN;
}
return hclge_handle_all_hw_msix_error(hdev, reset_requests);