OSDN Git Service

net: hns3: Clear mac vlan table entries when unload driver or function reset
authorJian Shen <shenjian15@huawei.com>
Fri, 5 Oct 2018 17:03:25 +0000 (18:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 19:01:54 +0000 (12:01 -0700)
commitf05e21097121b24cad92b15b570386bc68574d68
tree10a94efb5c1aa0c01e2d5888ddc53e421019db9f
parentdd2b6ef950b0dc5ede23291fa7fb0c322e8c116b
net: hns3: Clear mac vlan table entries when unload driver or function reset

In original codes, the mac vlan table entries are not cleared when
unload hns3 driver. The dirty mac vlan table entries will make the
result of looking up mac vlan table being unexpected.

When doing core reset or global reset, the firmware will clear all
the tables for driver, and driver shouldn't send any commands to
firmware during reset. But when doing function reset, the driver
needs to clear the tables itself.

This patch clears the mac vlan table entries for each client when
unload driver or reset.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c