diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2015-05-15 19:30:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-15 21:20:47 -0400 |
commit | 7e14069651591c81046ffaec13c3dac8cb70f5fb (patch) | |
tree | 0ba1f1b948b800b2f774df10d57db37a2093f875 | |
parent | 1f9993f6825f9cb93f75f794b66e7428dfc72467 (diff) |
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: a59a4d192166 ("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>
-rw-r--r-- | drivers/net/phy/phy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 52cd8db2c57d..757f28a4284c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -1053,13 +1053,14 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) | |||
1053 | { | 1053 | { |
1054 | /* According to 802.3az,the EEE is supported only in full duplex-mode. | 1054 | /* According to 802.3az,the EEE is supported only in full duplex-mode. |
1055 | * Also EEE feature is active when core is operating with MII, GMII | 1055 | * Also EEE feature is active when core is operating with MII, GMII |
1056 | * or RGMII. Internal PHYs are also allowed to proceed and should | 1056 | * or RGMII (all kinds). Internal PHYs are also allowed to proceed and |
1057 | * return an error if they do not support EEE. | 1057 | * should return an error if they do not support EEE. |
1058 | */ | 1058 | */ |
1059 | if ((phydev->duplex == DUPLEX_FULL) && | 1059 | if ((phydev->duplex == DUPLEX_FULL) && |
1060 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || | 1060 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || |
1061 | (phydev->interface == PHY_INTERFACE_MODE_GMII) || | 1061 | (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) || | ||
1063 | phy_is_internal(phydev))) { | 1064 | phy_is_internal(phydev))) { |
1064 | int eee_lp, eee_cap, eee_adv; | 1065 | int eee_lp, eee_cap, eee_adv; |
1065 | u32 lp, cap, adv; | 1066 | u32 lp, cap, adv; |