Skip to content

Commit 84f2776

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: stmmac: move setup of eee_ctrl_timer to stmmac_dvr_probe()
Move the initialisation of the EEE software timer to the probe function as it is unnecessary to do this each time we enable software LPI. 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 cfd49e5 commit 84f2776

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ static void stmmac_eee_init(struct stmmac_priv *priv, bool active)
494494
}
495495

496496
if (priv->eee_active && !priv->eee_enabled) {
497-
timer_setup(&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer, 0);
498497
stmmac_set_eee_timer(priv, priv->hw, STMMAC_DEFAULT_LIT_LS,
499498
STMMAC_DEFAULT_TWT_LS);
500499
if (priv->hw->xpcs)
@@ -7413,6 +7412,8 @@ int stmmac_dvr_probe(struct device *device,
74137412

74147413
INIT_WORK(&priv->service_task, stmmac_service_task);
74157414

7415+
timer_setup(&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer, 0);
7416+
74167417
/* Override with kernel parameters if supplied XXX CRS XXX
74177418
* this needs to have multiple instances
74187419
*/

0 commit comments

Comments
 (0)