aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2019-03-01 11:52:15 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-01 23:23:35 -0800
commit5434e8faf05a3a9514b0a3698245764780be41e0 (patch)
tree2ee34912acae0c1a5a89239348a2dc94a7c61ea3
parentnet: mvpp2: rework the XLG MAC reset handling (diff)
downloadlinux-dev-5434e8faf05a3a9514b0a3698245764780be41e0.tar.xz
linux-dev-5434e8faf05a3a9514b0a3698245764780be41e0.zip
net: mvpp2: reset the MACs when reconfiguring a port
This patch makes sure both PPv2 MACs (GMAC + XLG MAC) are set in reset while a port is reconfigured. This is done so that we make sure a MAC is in a reset state when not used, as only one of the two will be set out of reset after the port is configured properly. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index c64ddad6b2b3..57a23c96ad4d 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -3136,6 +3136,9 @@ static void mvpp22_mode_reconfigure(struct mvpp2_port *port)
{
u32 ctrl3;
+ /* Set the GMAC & XLG MAC in reset */
+ mvpp2_mac_reset_assert(port);
+
/* comphy reconfiguration */
mvpp22_comphy_init(port);