Re: [PATCH] net: phy: aquantia: Add 10mbps support

From: Andrew Lunn
Date: Thu May 04 2023 - 08:24:55 EST


On Thu, May 04, 2023 at 06:18:11AM +0000, Vyas, Devang nayanbhai wrote:
> [AMD Official Use Only - General]

Hi Devang

Please don't top post.

Also, wrap your emails at around 75 characters. Network Etiquette
rules apply for linux kernel mailling list.

> We are using AQR113C Marvell PHY which is CL45 based and based on below check in phy_probe() function:
> if (phydrv->features)
> linkmode_copy(phydev->supported, phydrv->features);
> else if (phydrv->get_features)
> err = phydrv->get_features(phydev);
> else if (phydev->is_c45)
> err = genphy_c45_pma_read_abilities(phydev); -> it reads capability from PMA register where 10M bit is read-only static and value is 0
> else
> err = genphy_read_abilities(phydev);
>
> Based on PHY datasheet, it supports 10M and we have made the change for the same and verified successfully.
>
> Below code should set the supported field under genphy_c45_pma_read_abilities(), but as the value is 0, we have to set the 10M mode explicitly.

So the PHY is 'broken' in that one of its registers has the wrong
value. However, it can probably be fixed. aQuantia firmware is not
just code executed by its embedded uC. It also contains
`provisioning`. This blob sets the values of many registers, and i
think can be used to set registers which are read only. Maybe the blob
you have is incorrectly provisioning the MDIO_PMA_EXTABLE_10BT
register.

Please talk to Marvell about the provisioning blob you have.

Andrew