diff options
| author | jbrunet <[email protected]> | 2016-11-28 09:46:46 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-11-30 00:38:31 +0000 |
| commit | d853d145ea3e63387a2ac759aa41d5e43876e561 (patch) | |
| tree | cb1b67733d8c7c38f68b37ca428b9c24d1ea5a46 /drivers/net/phy/phy.c | |
| parent | net: stmmac: enable tx queue 0 for gmac4 IPs synthesized with multiple TX queues (diff) | |
| download | kernel-d853d145ea3e63387a2ac759aa41d5e43876e561.tar.gz kernel-d853d145ea3e63387a2ac759aa41d5e43876e561.zip | |
net: phy: add an option to disable EEE advertisement
This patch adds an option to disable EEE advertisement in the generic PHY
by providing a mask of prohibited modes corresponding to the value found in
the MDIO_AN_EEE_ADV register.
On some platforms, PHY Low power idle seems to be causing issues, even
breaking the link some cases. The patch provides a convenient way for these
platforms to disable EEE advertisement and work around the issue.
Signed-off-by: Jerome Brunet <[email protected]>
Tested-by: Yegor Yefremov <[email protected]>
Tested-by: Andreas Färber <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/phy/phy.c')
| -rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 73adbaa9ac86..a3981cc6448a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1396,6 +1396,9 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) { int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); + /* Mask prohibited EEE modes */ + val &= ~phydev->eee_broken_modes; + phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val); return 0; |
