]> asedeno.scripts.mit.edu Git - linux.git/commit
net: mvpp2: always disable both MACs when disabling a port
authorAntoine Tenart <antoine.tenart@bootlin.com>
Fri, 1 Mar 2019 10:52:11 +0000 (11:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Mar 2019 07:23:34 +0000 (23:23 -0800)
commit6b10bfc51c494e0a2b2c0871797a1d825da9997c
treef44f280790727ed4aa78415a254bbfa82c97b95c
parent9a490e34069dff988d38327360862a622a149bd0
net: mvpp2: always disable both MACs when disabling a port

This patch modifies the port_disable() helper to always disable both the
GMAC and the XLG MAC when called. At boot time we do not know of a port
was enabled in the firmware/bootloader, and if so what mode was used
(hence which of the two MACs was used).

This also help in implementing a logic where all blocks are disabled
when not used, and only enabled regarding the current mode used on a
given port.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c