]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: mvpp2: set the GMAC, XLG MAC, XPCS and MPCS in reset when a port is down
authorAntoine Tenart <antoine.tenart@bootlin.com>
Fri, 1 Mar 2019 10:52:17 +0000 (11:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Mar 2019 07:23:35 +0000 (23:23 -0800)
This patch adds calls in the stop() helper to ensure both MACs and
both PCS blocks are set in reset when the user manually sets a port
down. This is done so that we have the exact same block reset states at
boot time and when a port is set down.

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

index 18ca3257a3ad06425fde8fd07b1529e66c5c157f..25fbed2b8d94674d43133f327740048773827115 100644 (file)
@@ -3525,6 +3525,9 @@ static int mvpp2_stop(struct net_device *dev)
 
        cancel_delayed_work_sync(&port->stats_work);
 
+       mvpp2_mac_reset_assert(port);
+       mvpp22_pcs_reset_assert(port);
+
        return 0;
 }