u-boot/drivers/net
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
..
fm blk: Remove various places that do flush cache after read 2017-09-15 08:05:10 -04:00
fsl-mc driver: fsl-mc: MC object cleanup when DPL not loaded 2017-12-06 14:56:31 -08:00
ldpaa_eth driver: net: fsl-mc: flib changes for MC 10.3.0 2017-12-06 14:55:17 -08:00
phy net: phy: meson-gxl: detect LPA corruption 2017-12-18 13:06:30 -05:00
8390.h
ag7xxx.c net: ag7xxx: Propagate errors on phy access 2017-08-07 15:18:29 -05:00
altera_tse.c fdt: Rename a few functions in fdt_support 2017-06-01 07:03:11 -06:00
altera_tse.h net: altera_tse: add mSG-DMA support 2015-11-12 08:26:59 +08:00
armada100_fec.c Update Maintainer and Author's email address 2016-12-27 11:24:17 -05:00
armada100_fec.h Update Maintainer and Author's email address 2016-12-27 11:24:17 -05:00
at91_emac.c gpio: at91_gpio: remove CPU_HAS_PIO3 macro 2017-04-13 14:44:50 -06:00
ax88180.c Remove some merge markers 2016-10-23 18:33:18 -04:00
ax88180.h
ax88796.c
ax88796.h
bcm-sf2-eth-gmac.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
bcm-sf2-eth-gmac.h
bcm-sf2-eth.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
bcm-sf2-eth.h net: move Broadcom SF2 driver to Kconfig 2017-08-07 15:18:30 -05:00
calxedaxgmac.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
cpsw-common.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
cpsw.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
cs8900.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
cs8900.h
davinci_emac.c ti816x: Enable ethernet support 2017-06-28 11:43:39 -04:00
davinci_emac.h ti816x: Enable ethernet support 2017-06-28 11:43:39 -04:00
dc2114x.c env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
designware.c net: designware: Convert to livetree 2017-09-18 20:40:34 +02:00
designware.h net: designware: Export the operation functions 2017-01-11 20:23:50 -07:00
dm9000x.c Fix GCC format-security errors and convert sprintfs. 2016-01-14 22:11:34 -05:00
dm9000x.h
dnet.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
dnet.h
dwc_eth_qos.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
e1000_spi.c net: e1000: Fix the build with driver model and SPI EEPROM 2016-08-15 13:34:45 -05:00
e1000.c net: e1000: fix indentation 2016-12-04 13:55:01 -05:00
e1000.h net: e1000: Convert to use DM PCI API 2016-02-05 12:47:23 +08:00
eepro100.c net: eepro100: Fix unused variable warning 2017-05-12 08:37:30 -04:00
enc28j60.c Remove various unused interrupt related code 2017-04-06 20:42:18 -04:00
enc28j60.h
ep93xx_eth.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
ep93xx_eth.h
ethoc.c dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
fec_mxc.c net: fec_mxc: Change "error frame" message to debug level 2017-10-30 18:57:42 +01:00
fec_mxc.h net: fec_mxc: Driver cleanups 2016-12-16 17:15:27 +01:00
fsl_mcdmafec.c net: fix typos 2017-09-07 13:23:52 -05:00
fsl_mdio.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftgmac100.c env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
ftgmac100.h
ftmac100.c nds32: ftmac100: Fix write mac addr fail problem. 2017-09-21 10:30:22 +08:00
ftmac100.h
ftmac110.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftmac110.h
gmac_rockchip.c net: gmac_rockchip: Add support for the RK3368 GMAC 2017-08-13 17:12:33 +02:00
Kconfig sunxi: restore PHYLIB for CONFIG_SUN4I_EMAC users 2017-11-09 14:39:30 +05:30
keystone_net.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
ks8851_mll.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
ks8851_mll.h
lan91c96.c env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
lan91c96.h
lpc32xx_eth.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
macb.c net: macb: Fix GMAC not work when enable DM_ETH 2017-06-02 14:44:19 -05:00
macb.h net: macb: add gmac multi-queue support 2015-08-11 13:27:15 -05:00
Makefile sunxi: fix CONFIG_SUNXI_EMAC references 2017-11-09 14:39:09 +05:30
mcffec.c net: fix typos 2017-09-07 13:23:52 -05:00
mcfmii.c net: mii: Changes not made by spatch 2016-08-15 15:29:03 -05:00
mpc8xx_fec.c powerpc, 8xx: fix missing function declarations. 2017-07-23 09:23:29 -04:00
mvgbe.c net: mvgbe: Fix build error with CONFIG_PHYLIB 2016-11-07 11:28:16 -06:00
mvgbe.h
mvneta.c net: fix typos 2017-09-07 13:23:52 -05:00
mvpp2.c net: mvpp2x: Set BM poll size once during priv probe 2017-08-10 08:33:02 +02:00
natsemi.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
ne2000_base.c env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
ne2000_base.h
ne2000.c
ne2000.h
netconsole.c env: Rename some other getenv()-related functions 2017-08-16 08:31:11 -04:00
ns8382x.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
pch_gbe.c net: pch_gbe: Add cache maintenance 2017-06-02 14:44:20 -05:00
pch_gbe.h net: pch_gbe: Convert to use DM PCI API 2016-02-05 12:47:23 +08:00
pcnet.c net: pcnet: Fix init on big endian 64 bit 2016-05-31 09:38:11 +02:00
pic32_eth.c dm: gpio: Add live tree support 2017-06-01 07:03:10 -06:00
pic32_eth.h drivers: net: Add ethernet driver for Microchip PIC32. 2016-02-01 22:14:02 +01:00
pic32_mdio.c drivers: net: Add ethernet driver for Microchip PIC32. 2016-02-01 22:14:02 +01:00
ravb.c net: ravb: Add R8A77995 D3 compatible 2017-12-09 13:36:26 +01:00
rtl8139.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
rtl8169.c net: rtl8169: remove unneeded definition 2016-12-04 13:55:01 -05:00
sandbox-raw.c env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
sandbox.c dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
sh_eth.c env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
sh_eth.h Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
smc911x.c net: mii: Fix changes made by spatch 2016-08-15 15:29:03 -05:00
smc911x.h
smc91111.c arm: Remove xaeniax board 2015-09-11 17:14:43 -04:00
smc91111.h Blackfin: Remove 2017-04-05 13:52:01 -04:00
sun8i_emac.c net: sun8i_emac: Fix build for non-H3/H5 SoCs 2017-11-10 19:10:33 +05:30
sunxi_emac.c dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
tsec.c dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
tsi108_eth.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
uli526x.c net: uli526x: Fix unknown storage size error 2017-05-12 08:37:32 -04:00
vsc7385.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
vsc9953.c drivers: net: vsc9953: Fix bug when PVID is shown for disabled ports only 2016-04-06 08:34:44 -07:00
xilinx_axi_emac.c net: xilinx_axi_emac: Use readl and writel for io ops 2017-11-29 08:02:40 +01:00
xilinx_emaclite.c dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
xilinx_ll_temac_fifo.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
xilinx_ll_temac_fifo.h
xilinx_ll_temac_mdio.c
xilinx_ll_temac_mdio.h
xilinx_ll_temac_sdma.c powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
xilinx_ll_temac_sdma.h powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
xilinx_ll_temac.c powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
xilinx_ll_temac.h
zynq_gem.c net: zynq_gem: Dont enable SGMII and PCS selection 2017-11-29 08:02:40 +01:00