Explorar o código

HACK: Revert "net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()"

This partially reverts commit 358e2e633ad0 ("net: ethernet: ti:
am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()") and restores
netif_carrier_on()/netif_carrier_off() in am65_cpsw_nuss_adjust_link().

This required to fix manual PHY link configuration in which case Network
core TX watchdog will be triggered periodically. The same is fixed in LKML
Network PHY core, so marked in HACK.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Grygorii Strashko %!s(int64=6) %!d(string=hai) anos
pai
achega
8d43c5ab8b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/net/ethernet/ti/am65-cpsw-nuss.c

+ 2 - 0
drivers/net/ethernet/ti/am65-cpsw-nuss.c

@@ -187,6 +187,7 @@ void am65_cpsw_nuss_adjust_link(struct net_device *ndev)
 				     ALE_PORT_STATE, ALE_PORT_STATE_FORWARD);
 
 		netif_tx_wake_all_queues(ndev);
+		netif_carrier_on(ndev);
 	} else {
 		int tmo;
 		/* disable forwarding */
@@ -202,6 +203,7 @@ void am65_cpsw_nuss_adjust_link(struct net_device *ndev)
 
 		cpsw_sl_ctl_reset(port->slave.mac_sl);
 
+		netif_carrier_off(ndev);
 		netif_tx_stop_all_queues(ndev);
 	}