30cbb524bc
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:
|
||
---|---|---|
.. | ||
aquantia.c | ||
atheros.c | ||
broadcom.c | ||
cortina.c | ||
davicom.c | ||
et1011c.c | ||
fixed.c | ||
generic_10g.c | ||
Kconfig | ||
lxt.c | ||
Makefile | ||
marvell.c | ||
meson-gxl.c | ||
micrel_ksz8xxx.c | ||
micrel_ksz90x1.c | ||
miiphybb.c | ||
mscc.c | ||
mv88e61xx.c | ||
mv88e6352.c | ||
natsemi.c | ||
phy.c | ||
realtek.c | ||
smsc.c | ||
teranetics.c | ||
ti.c | ||
vitesse.c | ||
xilinx_phy.c |