diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2017-12-08 12:08:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-11 11:18:33 -0500 |
commit | f1e2400a80ff55eb7c5f4fd9d7eb163fd0de9a2c (patch) | |
tree | cc19ef9d60473bf211269d9baac580bfadff5a1b /kernel | |
parent | a8ceb5dbfde1092b466936bca0ff3be127ecf38e (diff) | |
download | linux-f1e2400a80ff55eb7c5f4fd9d7eb163fd0de9a2c.tar.gz linux-f1e2400a80ff55eb7c5f4fd9d7eb163fd0de9a2c.tar.bz2 linux-f1e2400a80ff55eb7c5f4fd9d7eb163fd0de9a2c.zip |
net: phy: meson-gxl: detect LPA corruption
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.
Fixes: 7334b3e47aee ("net: phy: Add Meson GXL Internal PHY driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions