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: aa5c4f175b
("net: hns3: add reset handling for VF when doing PF reset")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cd513a6975
commit
cc645dfa89
@ -2677,7 +2677,7 @@ static int hclge_set_all_vf_rst(struct hclge_dev *hdev, bool reset)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!reset)
|
||||
if (!reset || !test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state))
|
||||
continue;
|
||||
|
||||
/* Inform VF to process the reset.
|
||||
|
Loading…
Reference in New Issue
Block a user