struct stmmac_priv *priv = netdev_priv(dev);
        u32 chan;
 
-       if (priv->eee_enabled)
-               del_timer_sync(&priv->eee_ctrl_timer);
-
        if (device_may_wakeup(priv->device))
                phylink_speed_down(priv->phylink, false);
        /* Stop and disconnect the PHY */
        if (priv->lpi_irq > 0)
                free_irq(priv->lpi_irq, dev);
 
+       if (priv->eee_enabled) {
+               priv->tx_path_in_lpi_mode = false;
+               del_timer_sync(&priv->eee_ctrl_timer);
+       }
+
        /* Stop TX/RX DMA and clear the descriptors */
        stmmac_stop_all_dma(priv);
 
        for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
                del_timer_sync(&priv->tx_queue[chan].txtimer);
 
+       if (priv->eee_enabled) {
+               priv->tx_path_in_lpi_mode = false;
+               del_timer_sync(&priv->eee_ctrl_timer);
+       }
+
        /* Stop TX/RX DMA */
        stmmac_stop_all_dma(priv);