On Tue, Nov 24, 2020 at 04:17:42PM +0100, Antonio Borneo wrote:
On Tue, 2020-11-24 at 14:56 +0000, Russell King - ARM Linux admin wrote:
Userspace doesn't expect the advertising mask to change beneath it. Since updates from userspace are done using a read-modify-write of the ksettings, this can have the undesired effect of removing 1G from the configured advertising mask.
We've had other PHYs have this behaviour; the correct solution is for the PHY driver to implement reading the resolution from the PHY rather than relying on the generic implementation if it can down-shift
If it's already upstream, could you please point to one of the phy driver that already implements this properly?
Reading the resolved information is PHY specific as it isn't standardised.
Marvell PHYs have read the resolved information for a very long time. I added support for it to at803x.c:
06d5f3441b2e net: phy: at803x: use operating parameters from PHY-specific status
after it broke for exactly the reason you're reporting for your PHY.