OSDN Git Service

net: hns3: add a separate error handling task
authorJiaran Zhang <zhangjiaran@huawei.com>
Mon, 7 Jun 2021 11:18:10 +0000 (19:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 21:00:37 +0000 (14:00 -0700)
commitd991452dd7900cf152ffb43db3b1d385e1a01579
treefdeb20617347ac51c1367740f628222e9ee16c78
parentca4e2b94eb98db8472a6cb5b47147e079659dc9c
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h