u-boot-brain/drivers/net/phy
Jerome Brunet 30cbb524bc net: phy: meson-gxl: detect LPA corruption
This patch is ported from the Linux patch posted at [1] and applied to
net tree as commit f1e2400a80ff.

The purpose of this change is to fix the incorrect detection of the link
partner (LP) advertised capabilities which sometimes happens with this PHY
(roughly 1 time in a dozen)

This issue may cause the link to be negotiated at 10Mbps/Full or
10Mbps/Half when 100MBps/Full is actually possible. In some case, the link
is even completely broken and no communication is possible.

To detect the corruption, we must look for a magic undocumented bit in the
WOL bank (hint given by the SoC vendor kernel) but this is not enough to
cover all cases. We also have to look at the LPA ack. If the LP supports
Aneg but did not ack our base code when aneg is completed, we assume
something went wrong.

The detection of a corrupted LPA triggers a restart of the aneg process.
This solves the problem but may take up to 6 retries to complete.

[1] https://lkml.kernel.org/r/20171208110811.30789-1-jbrunet@baylibre.com

Fixes: 8995a96d1d ("net: phy: Add Amlogic Meson GXL Internal PHY support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-12-18 13:06:30 -05:00
..
aquantia.c driver: net: phylib: add support for aquantia AQR106/107 PHY 2016-07-06 10:45:04 -05:00
atheros.c drivers: net: phy: atheros: add separate config for AR8031 2016-10-13 12:24:55 -05:00
broadcom.c net: phy: Add AFE settings to the Broadcom Cygnus phy 2017-08-07 15:18:31 -05:00
cortina.c blk: Remove various places that do flush cache after read 2017-09-15 08:05:10 -04:00
davicom.c net: phy: Handle phy_startup() error codes properly 2016-05-24 13:17:59 +02:00
et1011c.c net: phy: Handle phy_startup() error codes properly 2016-05-24 13:17:59 +02:00
fixed.c drivers/net/phy/fixed: do not overwrite addr 2017-08-07 15:18:28 -05:00
generic_10g.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Kconfig net: phy: Add Amlogic Meson GXL Internal PHY support 2017-11-17 07:44:13 -05:00
lxt.c net: phy: Handle phy_startup() error codes properly 2016-05-24 13:17:59 +02:00
Makefile net: phy: Add Amlogic Meson GXL Internal PHY support 2017-11-17 07:44:13 -05:00
marvell.c net: phy: marvell: Fix init function for m88e1145 2017-06-12 12:18:14 -07:00
meson-gxl.c net: phy: meson-gxl: detect LPA corruption 2017-12-18 13:06:30 -05:00
micrel_ksz8xxx.c net: phy: micrel: Remove ksz90x1 drivers from micrel_ksz8xxx 2017-08-07 15:18:30 -05:00
micrel_ksz90x1.c net: phy: micrel: Convert to livetree 2017-09-18 20:40:34 +02:00
miiphybb.c net: mii: Changes not made by spatch 2016-08-15 15:29:03 -05:00
mscc.c net: phy: MSCC Add Support for VSC8530-VSC8531-VSC8540-VSC8541 2017-02-08 16:32:58 -06:00
mv88e61xx.c net: phy: mv88e61xx: Fix uninitialized variable warning 2017-05-12 08:37:30 -04:00
mv88e6352.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
natsemi.c net: phy: Handle phy_startup() error codes properly 2016-05-24 13:17:59 +02:00
phy.c net: phy: Add Amlogic Meson GXL Internal PHY support 2017-11-17 07:44:13 -05:00
realtek.c net: phy: realtek: fix enabling of the TX-delay for RTL8211F 2017-09-07 13:23:52 -05:00
smsc.c net: phy: add SMSC LAN8742 phy 2017-01-28 14:04:47 -05:00
teranetics.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ti.c dm: core: Replace of_offset with accessor (part 2) 2017-06-01 07:03:04 -06:00
vitesse.c net: phy: vitesse: Fix cis8204 RGMII_ID code 2017-02-07 10:54:34 -06:00
xilinx_phy.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00