diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2020-01-11 16:33:49 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-11 14:52:22 -0800 |
commit | 8627bdedc435865b015cedeb26e3791dec5b3a41 (patch) | |
tree | 7f0b5a09f5acf0a7c272201a652b07325ecbd097 /drivers/net/ethernet/dnet.h | |
parent | 1cc9bc6e586782921f2bc31fd9f121e8fe2de100 (diff) |
net: hns3: refactor the precedure of PF FLR
Currently, the actual work of PF FLR is handled in the reset task,
which is asynchronous. So in some case, if the preparing and
rebuilding are not done, then the PF FLR will trigger some problems,
for example, makes hardware go into chaos.
So this patch separates the process of PF FLR from reset task, and
adds a semaphore to serialize this reset and others.
When FLR's preparing fails, if there has other higher level reset
pending or failing times less than the HCLGE_FLR_RETRY_CNT, this
preparing should be retried, otherwise PF and its VF may get into
wrong state.
BTW, while the hardware reports misc interrupt during pcie_flr(),
the driver can not receive this interrupt anymore, so disable it
when hclge_flr_prepare() return, and re-enable it when enter
hclge_flr_done().
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dnet.h')
0 files changed, 0 insertions, 0 deletions