From: Russell King > Sent: 24 November 2020 15:17 ... > That said, _if_ the PHY has a way to read the resolved state rather > than reading the advertisement registers, that is what should be > used (as I said previously) rather than trying to decode the > advertisement registers ourselves. That is normally more reliable > for speed and duplex. Determining the speed and duplux from the ANAR and ANRR (I can't remember the name of the response register) has always been completely broken. The problems arise when you connect to either a 10M hub or a 10/100M autodetecting hub (these are a 10M hub and a 100M hub connected by a bridge). The PHY will either see single link test pulses (10M hub) or a simple burst of link test pulses (10/100 hub) and fall back to 10M HDX or 100M HDX. Both the 10M hub and 10/100 hub are happy with the link test pulse stream that contains the ANAR. However the ANRR register will (typically) contain the value from the last system that sent it one. So if you unplug from something that does 100M FDX and plug into a hub the MAC unit is likely to be misconfigured and do FDX. Of course, there is no generic way to get the actual mode. I'm not sure the PHY I was using (a long time ago) even had any private register that could tell you. For one system (which was never going to do anything fast) I just removed the FDX modes from the ANAR. The MAC didn't care whether it was 10M or 100M. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)