Commit cc645dfa authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

net: hns3: not reset vport who not alive when PF reset

If a vport is not alive, it is unnecessary to notify it to reset
before PF asserting a reset. So before inform vport to reset,
we need to check its alive state firstly.

Fixes: aa5c4f17 ("net: hns3: add reset handling for VF when doing PF reset")
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd513a69
...@@ -2677,7 +2677,7 @@ static int hclge_set_all_vf_rst(struct hclge_dev *hdev, bool reset) ...@@ -2677,7 +2677,7 @@ static int hclge_set_all_vf_rst(struct hclge_dev *hdev, bool reset)
return ret; return ret;
} }
if (!reset) if (!reset || !test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state))
continue; continue;
/* Inform VF to process the reset. /* Inform VF to process the reset.
......
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