]> git.ipfire.org Git - people/arne_f/kernel.git/commit
net: dsa: mv88e6060: fix switch MAC address
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 13 Oct 2017 17:39:22 +0000 (13:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Oct 2017 01:40:03 +0000 (18:40 -0700)
commit3efc93c2bc243f940beb3324f67aa14e223abdd1
tree35e4857123ca73d7cb7fde24d3dcf9580c08bfe9
parent5903f594935a3841137c86b9d5b75143a5b7121c
net: dsa: mv88e6060: fix switch MAC address

The 88E6060 Ethernet switch always transmits the multicast bit of the
switch MAC address as a zero. It re-uses the corresponding bit 8 of the
register "Switch MAC Address Register Bytes 0 & 1" for "DiffAddr".

If the "DiffAddr" bit is 0, then all ports transmit the same source
address. If it is set to 1, then bit 2:0 are used for the port number.

The mv88e6060 driver is currently wrongly shifting the MAC address byte
0 by 9. To fix this, shift it by 8 as usual and clear its bit 0.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6060.c