diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-08-22 21:55:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-23 14:39:09 -0400 |
commit | a9f6309585cbefa4a7f08c9017ca482c3222323a (patch) | |
tree | 954313a4638dfca0e7cab923dff7057c28789641 | |
parent | 66ce7fb9807b036058aa380bfd2b3851ae25ce39 (diff) |
net: phy: allow phy_init_eee() to work with internal PHYs
Internal PHYs do not have any specific phy_interface_t defined because
they are within an Ethernet MAC or a larger IC, they will fail the early
check in phy_init_eee(). Allow these PHYs to proceed with EEE
initialization and report error/success by checking the standard C45
EEE-related 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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e7a5893f32ff..932190e04d08 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -1019,12 +1019,14 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) | |||
1019 | { | 1019 | { |
1020 | /* According to 802.3az,the EEE is supported only in full duplex-mode. | 1020 | /* According to 802.3az,the EEE is supported only in full duplex-mode. |
1021 | * Also EEE feature is active when core is operating with MII, GMII | 1021 | * Also EEE feature is active when core is operating with MII, GMII |
1022 | * or RGMII. | 1022 | * or RGMII. Internal PHYs are also allowed to proceed and should |
1023 | * return an error if they do not support EEE. | ||
1023 | */ | 1024 | */ |
1024 | if ((phydev->duplex == DUPLEX_FULL) && | 1025 | if ((phydev->duplex == DUPLEX_FULL) && |
1025 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || | 1026 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || |
1026 | (phydev->interface == PHY_INTERFACE_MODE_GMII) || | 1027 | (phydev->interface == PHY_INTERFACE_MODE_GMII) || |
1027 | (phydev->interface == PHY_INTERFACE_MODE_RGMII))) { | 1028 | (phydev->interface == PHY_INTERFACE_MODE_RGMII) || |
1029 | phy_is_internal(phydev))) { | ||
1028 | int eee_lp, eee_cap, eee_adv; | 1030 | int eee_lp, eee_cap, eee_adv; |
1029 | u32 lp, cap, adv; | 1031 | u32 lp, cap, adv; |
1030 | int status; | 1032 | int status; |