From e7e8f23777fb5195194960fa2292687405eafb6f Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Tue, 14 Mar 2017 12:24:42 -0500 Subject: Add a fix for the KSZ9031RNX errata 5. Fixes the Auto-Negotiation link-up failure / long link-up time with some partners. (cherry picked from commit 3f54ce3814dc86a8d0ad44192db7939fd6f5eff3) --- sys/dev/mii/micphy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index ddd0a19..a33c497 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -220,6 +220,13 @@ ksz9031_load_values(struct mii_softc *sc, phandle_t node) ksz90x1_load_values(sc, node, 2, MII_KSZ9031_CLOCK_PAD_SKEW, "rxc-skew-ps", 0x1f, 0, "txc-skew-ps", 0x1f, 5, NULL, 0, 0, NULL, 0, 0); + + /* + * Fix for errata 5. + * Set the device's Auto-Negotiation FLP (Fast Link Pulse) to 16ms. + */ + ksz9031_write(sc, 0, 0x4, 0x6); + ksz9031_write(sc, 0, 0x3, 0x1a80); } static void -- cgit v1.1