]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpsw: fix vlan configuration while down/up
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Thu, 8 Nov 2018 20:27:57 +0000 (22:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 04:30:58 +0000 (20:30 -0800)
commitddda8b76ecc50aac832732774eae205074a4ae19
tree6cc53617b8851622cbcadf1c434c22bff4de857e
parentf5ffcc44a804b41056aae4f7d3c3ec3a577ec017
net: ethernet: ti: cpsw: fix vlan configuration while down/up

The vlan configuration is not restored after interface donw/up sequence
(if dual-emac - both interfaces). Tested on am572x EVM.

Steps to check:
~# ip link add link eth1 name eth1.100 type vlan id 100
~# ifconfig eth0 down
~# ifconfig eth1 down

Try to remove vid and observe warning:
~# ip link del eth1.100
[  739.526757] net eth1: removing vlanid 100 from vlan filter
[  739.533322] failed to kill vid 0081/100 for device eth1

This patch fixes it, restoring only vlan ALE entries and all other
unicast/multicast entries are restored by system calling rx_mode ndo.

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c