Skip to content

Commit 27af081

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: stmmac: remove unnecessary EEE handling in stmmac_release()
phylink_stop() will cause phylink to call the mac_link_down() operation before phylink_stop() returns. As mac_link_down() will call stmmac_eee_init(false), this will set both priv->eee_active and priv->eee_enabled to be false, deleting the eee_ctrl_timer if priv->eee_enabled was previously set. As stmmac_release() calls phylink_stop() before checking whether priv->eee_enabled is true, this is a condition that can never be satisfied, and thus the code within this if() block will never be executed. Remove it. Reviewed-by: Andrew Lunn <[email protected]> Tested-by: Choong Yong Liang <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 84f2776 commit 27af081

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4041,11 +4041,6 @@ static int stmmac_release(struct net_device *dev)
40414041
/* Free the IRQ lines */
40424042
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
40434043

4044-
if (priv->eee_enabled) {
4045-
priv->tx_path_in_lpi_mode = false;
4046-
del_timer_sync(&priv->eee_ctrl_timer);
4047-
}
4048-
40494044
/* Stop TX/RX DMA and clear the descriptors */
40504045
stmmac_stop_all_dma(priv);
40514046

0 commit comments

Comments
 (0)