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 <jbrunet@baylibre.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
jbrunet
2016-11-28 10:46:46 +01:00
committed by David S. Miller
parent 436feafe95
commit d853d145ea
3 changed files with 77 additions and 9 deletions

View File

@@ -417,6 +417,9 @@ struct phy_device {
u32 advertising;
u32 lp_advertising;
/* Energy efficient ethernet modes which should be prohibited */
u32 eee_broken_modes;
int autoneg;
int link_timeout;