Skip to content

Commit 54033f5

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: bcm: asp2: fix LPI timer handling
Fix the LPI timer handling in Broadcom ASP2 driver after the phylib managed EEE patches were merged. Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Florian Fainelli <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7a1723d commit 54033f5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ static int bcmasp_get_eee(struct net_device *dev, struct ethtool_keee *e)
371371
return -ENODEV;
372372

373373
e->tx_lpi_enabled = p->tx_lpi_enabled;
374-
e->tx_lpi_timer = umac_rl(intf, UMC_EEE_LPI_TIMER);
375374

376375
return phy_ethtool_get_eee(dev->phydev, e);
377376
}
@@ -395,7 +394,6 @@ static int bcmasp_set_eee(struct net_device *dev, struct ethtool_keee *e)
395394
return ret;
396395
}
397396

398-
umac_wl(intf, e->tx_lpi_timer, UMC_EEE_LPI_TIMER);
399397
intf->eee.tx_lpi_enabled = e->tx_lpi_enabled;
400398
bcmasp_eee_enable_set(intf, true);
401399
}

drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,8 @@ static void bcmasp_adj_link(struct net_device *dev)
677677
}
678678
umac_wl(intf, reg, UMC_CMD);
679679

680+
umac_wl(intf, phydev->eee_cfg.tx_lpi_timer, UMC_EEE_LPI_TIMER);
681+
680682
active = phy_init_eee(phydev, 0) >= 0;
681683
bcmasp_eee_enable_set(intf, active);
682684
}
@@ -1055,6 +1057,9 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect)
10551057

10561058
/* Indicate that the MAC is responsible for PHY PM */
10571059
phydev->mac_managed_pm = true;
1060+
1061+
/* Set phylib's copy of the LPI timer */
1062+
phydev->eee_cfg.tx_lpi_timer = umac_rl(intf, UMC_EEE_LPI_TIMER);
10581063
}
10591064

10601065
umac_reset(intf);

0 commit comments

Comments
 (0)