提交 d494389a 编写于 作者: Y Yonglong Liu 提交者: Laibin Qiu

net: hns3: fix error resume keep alive when remove hclgevf

driver inclusion
category: https://gitee.com/openeuler/kernel/issues/I5S7WZ
bugzilla: NA
CVE: NA

----------------------------

When enable lots of vf, remove the driver of vf will call keep
alive wrong resume.

Fixes: 6a804d0a ("net: hns3: fix keep alive can not resume problem when system busy")
Signed-off-by: NYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: Nli yongxin <liyongxin1@huawei.com>
Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
上级 de092558
......@@ -7096,6 +7096,7 @@ int hclge_vport_start(struct hclge_vport *vport)
struct hclge_dev *hdev = vport->back;
vport->last_active_jiffies = jiffies;
set_bit(HCLGE_VPORT_STATE_START, &vport->state);
set_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state);
if (test_bit(vport->vport_id, hdev->vport_config_block)) {
......@@ -7113,6 +7114,7 @@ int hclge_vport_start(struct hclge_vport *vport)
void hclge_vport_stop(struct hclge_vport *vport)
{
clear_bit(HCLGE_VPORT_STATE_START, &vport->state);
clear_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state);
}
......
......@@ -926,6 +926,7 @@ enum HCLGE_VPORT_STATE {
HCLGE_VPORT_STATE_MAC_TBL_CHANGE,
HCLGE_VPORT_STATE_PROMISC_CHANGE,
HCLGE_VPORT_STATE_VLAN_FLTR_CHANGE,
HCLGE_VPORT_STATE_START,
HCLGE_VPORT_STATE_MAX
};
......
......@@ -644,7 +644,8 @@ static void hclge_vf_keep_alive(struct hclge_vport *vport)
vport->last_active_jiffies = jiffies;
if (!test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state)) {
if (test_bit(HCLGE_VPORT_STATE_START, &vport->state) &&
!test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state)) {
set_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state);
dev_info(&hdev->pdev->dev, "VF %u keep alive resume!",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册