Subject: Re: [PATCH net-next v2 1/4] net: phy: add the link modes for 1000BASE-T1 Ethernet PHY

From: Stefan Eichenberger <[email-masked]>
Date: Fri, 14 Jul 2023 05:51:10 +0200

On Thu, Jul 13, 2023 at 05:18:02PM +0200, Andrew Lunn wrote:
> 
> **
>  * genphy_c45_baset1_able - checks if the PMA has BASE-T1 extended abilities
>  * @phydev: target phy_device struct
>  */
> static bool genphy_c45_baset1_able(struct phy_device *phydev)
> {
>         int val;
> 
>         if (phydev->pma_extable == -ENODATA) {
>                 val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_EXTABLE);
>                 if (val < 0)
>                         return false;
> 
>                 phydev->pma_extable = val;
>         }
> 
>         return !!(phydev->pma_extable & MDIO_PMA_EXTABLE_BT1);
> }
> 
> This is rather odd, but might help you. You already have a workaround
> in mv88q2xxx_config_init(). Have you tried adding a get_features()
> callback with sets phydev->pma_extable to the correct value, and then
> calls genphy_c45_pma_read_abilities()?
> 
> Please also report the bug in the PHY to Marvell. Maybe a later
> revision might have it fixed.

Thanks for the suggestion. Unfortunately,
genphy_c45_pma_read_abilities() directly reads from the PHY registers.
Therefore, I can't use the pma_extable. But probably I can just set the
missing features in get_features for this PHY. I will see what I can do
here.

Thanks,
Stefan