]> asedeno.scripts.mit.edu Git - linux.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)
commit00fe47120502076e8a377ba259c10a30ba21d777
tree6cc53617b8851622cbcadf1c434c22bff4de857e
parent15180eca569bfe1d4d3edbe02da76d5345e773b5
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