RE: [PATCH v1 1/1] net: phy: micrel: Add workaround for incomplete autonegotiation
From: Asmaa Mnebhi <asmaa@nvidia.com>
Date: 2024-01-24 22:18:24
quoted
What is the link partner? From the datasheet MMD Address 1h, Register 5Ah – 1000BASE-T Link-Up Time Control When the link partner is another KSZ9031 device, the 1000BASE-T link-up time can be long. These three bits provide an optional setting to reduce the 1000BASE-T link-up time. 100 = Default power-up setting 011 = Optional setting to reduce link-up time when the link partner is a KSZ9031 device. Might be worth setting it and see what happens. Have you tried playing with the prefer master/prefer slave options? If you have identical PHYs on each end, it could be they are generating the same'random'quoted
number used to determine who should be master and who should be slave. If they both pick the same number, they are supposed to pick a different random number and try again. There have been some PHYs which are broken in this respect. prefer master/prefer slave should influence the random number, biasing it higher/lower. auto-neg should typically take a little over 1 second. 5 seconds is way too long, something is not correct. You might want to sniff the fast link pulses, try to decode the values and see what is going on. I would not be surprised if you find out this 5 second complete time is somehow related to it not completing at all.The link partner is a switch (KSZ9893R) so I am not sure setting the 5Ah register to 011 would help.
I set the 5Ah register to 011 and that didn’t help. I also am consulting the vendor and the hardware team regarding why autonegotiation takes so long with the KSZ9031. Will report back when they get back to me.