Skip to content

Commit 7e14069

Browse files
ffainellidavem330
authored andcommitted
net: phy: Allow EEE for all RGMII variants
RGMII interfaces come in multiple flavors: RGMII with transmit or receive internal delay, no delays at all, or delays in both direction. This change extends the initial check for PHY_INTERFACE_MODE_RGMII to cover all of these variants since EEE should be allowed for any of these modes, since it is a property of the RGMII, hence Gigabit PHY capability more than the RGMII electrical interface and its delays. Fixes: a59a4d1 ("phy: add the EEE support and the way to access to the MMD registers") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1f9993f commit 7e14069

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/net/phy/phy.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,13 +1053,14 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
10531053
{
10541054
/* According to 802.3az,the EEE is supported only in full duplex-mode.
10551055
* Also EEE feature is active when core is operating with MII, GMII
1056-
* or RGMII. Internal PHYs are also allowed to proceed and should
1057-
* return an error if they do not support EEE.
1056+
* or RGMII (all kinds). Internal PHYs are also allowed to proceed and
1057+
* should return an error if they do not support EEE.
10581058
*/
10591059
if ((phydev->duplex == DUPLEX_FULL) &&
10601060
((phydev->interface == PHY_INTERFACE_MODE_MII) ||
10611061
(phydev->interface == PHY_INTERFACE_MODE_GMII) ||
1062-
(phydev->interface == PHY_INTERFACE_MODE_RGMII) ||
1062+
(phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
1063+
phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID) ||
10631064
phy_is_internal(phydev))) {
10641065
int eee_lp, eee_cap, eee_adv;
10651066
u32 lp, cap, adv;

0 commit comments

Comments
 (0)