net: hns3: Preserve vlan 0 in hardware table
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 3 Sep 2018 10:21:52 +0000 (11:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:29 +0000 (11:08 -0800)
commit35aafd40b173d7feeee812f49c89614a2011bdc5
tree0d290de962d5f03eb19c6a2000510c313f9afec4
parente6ae1e7b0fea53de4bfdc47f3fd12b6605d2b039
net: hns3: Preserve vlan 0 in hardware table

[ Upstream commit daaa8521760ee4d4e65f309c4c37b3a1e58c9d4e ]

When netdev is down, the stack will delete the vlan from
hardware including vlan0, which will cause problem when
doing loopback selftest when netdev is down.

This patch fixes it by always preserving vlan 0 in hardware,
because vlan 0 is defalut vlan, which should always be in
hardware.

Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c