Skip to content

Commit a6a10d4

Browse files
yangbolu1991davem330
authored andcommitted
enetc: disable EEE autoneg by default
The EEE support has not been enabled on ENETC, but it may connect to a PHY which supports EEE and advertises EEE by default, while its link partner also advertises EEE. If this happens, the PHY enters low power mode when the traffic rate is low and causes packet loss. This patch disables EEE advertisement by default for any PHY that ENETC connects to, to prevent the above unwanted outcome. Signed-off-by: Yangbo Lu <[email protected]> Reviewed-by: Claudiu Manoil <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ae72555 commit a6a10d4

File tree

1 file changed

+5
-0
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+5
-0
lines changed

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,7 @@ static int enetc_phy_connect(struct net_device *ndev)
13321332
{
13331333
struct enetc_ndev_priv *priv = netdev_priv(ndev);
13341334
struct phy_device *phydev;
1335+
struct ethtool_eee edata;
13351336

13361337
if (!priv->phy_node)
13371338
return 0; /* phy-less mode */
@@ -1345,6 +1346,10 @@ static int enetc_phy_connect(struct net_device *ndev)
13451346

13461347
phy_attached_info(phydev);
13471348

1349+
/* disable EEE autoneg, until ENETC driver supports it */
1350+
memset(&edata, 0, sizeof(struct ethtool_eee));
1351+
phy_ethtool_set_eee(phydev, &edata);
1352+
13481353
return 0;
13491354
}
13501355

0 commit comments

Comments
 (0)