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(). Andrew