diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 97e4c992cd38df..2d1530e81e7f65 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -70,6 +70,9 @@ static void bcmgenet_set_rx_mode(struct net_device *dev); static bool skip_umac_reset = false; module_param(skip_umac_reset, bool, 0444); MODULE_PARM_DESC(skip_umac_reset, "Skip UMAC reset step"); +static bool eee = true; +module_param(eee, bool, 0444); +MODULE_PARM_DESC(eee, "Enable EEE (default Y)"); static inline void bcmgenet_writel(u32 value, void __iomem *offset) { @@ -3430,6 +3433,17 @@ static int bcmgenet_open(struct net_device *dev) bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause); + if (!eee) { + struct ethtool_keee eee_data; + + ret = bcmgenet_get_eee(dev, &eee_data); + if (ret == 0) { + eee_data.eee_enabled = 0; + bcmgenet_set_eee(dev, &eee_data); + netdev_warn(dev, "EEE disabled\n"); + } + } + bcmgenet_netif_start(dev); netif_tx_start_all_queues(dev);