]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix to stop multiple HNS reset due to the AER changes
authorShiju Jose <shiju.jose@huawei.com>
Sun, 10 Mar 2019 06:47:51 +0000 (14:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Mar 2019 06:58:47 +0000 (22:58 -0800)
commitac9f294aa3870620b32d3a47fb83821532f0a53c
tree837fdf6b389693a70b5ae5d0b6c5fe44d61d9388
parent0ce19a514c1805b2fff6f972dfb11fc4efe586d9
net: hns3: fix to stop multiple HNS reset due to the AER changes

The commit f5690bdefa6d
("PCI/ERR: Run error recovery callbacks for all affected devices")
affected the non-fatal error recovery logic for the HNS and RDMA devices.
This is because each HNS PF under PCIe bus receive callbacks
from the AER driver when an error is reported for one of the PF.
This causes unwanted PF resets because
the HNS decides which PF to reset based on the reset type set.
The HNS error handling code sets the reset type based on the hw error
type detected.

This patch provides fix for the above issue for the recovery of
the hw errors in the HNS and RDMA devices.

This patch needs backporting to the kernel v5.0+

Fixes: d8b51a6f1bca ("net: hns3: add handling of hw ras errors using new set of commands")
Reported-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c