net: hns3: fix VLAN filter restore issue after reset
authorJian Shen <shenjian15@huawei.com>
Mon, 3 Jun 2019 02:09:15 +0000 (10:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jun 2019 22:32:50 +0000 (15:32 -0700)
commitb524b38ff6320f58f5d0e95640eec82fae850887
tree7b8e818fe1dc902d9cc45830435042cf6164e690
parent81a9255e476e556f9d3ed1b53d85904882c29555
net: hns3: fix VLAN filter restore issue after reset

In orginal codes, the driver only restore VLAN filter entries
for PF after reset, the VLAN entries of VF will lose in this
case.

This patch fixes it by recording VLAN IDs for each function
when add VLAN, and restore the VLAN IDs after reset.

Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when resetting")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c