On 11/30/26 5:34 AM, Andrew Lunn wrote:
> On Mon, Nov 30, 2026 at 02:55:18AM +0200, Cristian Ciocaltea wrote:
>> The Clause 45 ability registers hold a single bit for 10BASE-T and one >> for 100BASE-TX, so genphy_c45_pma_read_abilities() derives both the full >> and half duplex link modes from each of them, even on PHYs that support >> neither 10BASE-T nor half duplex. >> >> Read the 2.5G, 5G and 10G abilities from the Clause 45 registers as >> before, then take the 10M, 100M and 1G link modes from the Clause 22 >> ADVERTISE and CTRL1000 registers mapped in the AN MMD. The firmware >> does not update the C22 BMSR/ESTATUS ability bits, but its default >> advertisement reflects the modes the PHY actually supports. If the >> advertisement reads back empty, keep the Clause 45 derived modes.
> > This is funky, i'm not sure this is a safe assumption to make. > > Is it known what this PHY actually supports? > > I think it would be better to just accept the firmware is broken and > hard code the 10/100/1G link modes after calling > genphy_c45_pma_read_abilities().
Yeah, the firmware is definitely broken. This is what ethtool currently shows for both PHY generations: Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full 10000baseT/Full 2500baseT/Full 5000baseT/Full However, my understanding is that Gen1 doesn't actually support 10baseT, only Gen2 does, while 100baseT/Half is never advertised by the firmware. I can go with the hard-coded approach, as there doesn't seem to be a better or more reliable way to get this information from the hardware. Thanks, Cristian