Skip to content
Snippets Groups Projects
Commit d494389a authored by Yonglong Liu's avatar Yonglong Liu Committed by Laibin Qiu
Browse files

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: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarli yongxin <liyongxin1@huawei.com>
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
parent de092558
No related branches found
No related tags found
No related merge requests found
......@@ -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!",
......
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