aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2019-04-06 15:43:27 +0800
committerDavid S. Miller <davem@davemloft.net>2019-04-08 15:30:49 -0700
commitcc645dfa89a747382beaf62d69daafe60fd1cd94 (patch)
tree8715620ffc04a65d06dbde48ff9022696b0df00e /drivers
parentnet: hns3: set up the vport alive state while reinitializing (diff)
downloadlinux-dev-cc645dfa89a747382beaf62d69daafe60fd1cd94.tar.xz
linux-dev-cc645dfa89a747382beaf62d69daafe60fd1cd94.zip
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: aa5c4f175be6 ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 62e3436d3921..693dfdda7537 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -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.