Commit ec266094 authored by Dimitri Fedrau's avatar Dimitri Fedrau Committed by Jakub Kicinski

net: phy: marvell-88q2xxx: cleanup mv88q2xxx_config_init

mv88q2xxx_config_init calls genphy_c45_read_pma which is done by
mv88q2xxx_read_status, it calls also mv88q2xxx_config_aneg which is
also called by the PHY state machine. Let the PHY state machine handle
the phydriver ops in their intendend way.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarStefan Eichenberger <eichest@gmail.com>
Signed-off-by: default avatarDimitri Fedrau <dima.fedrau@gmail.com>
Link: https://lore.kernel.org/r/20240218075753.18067-13-dima.fedrau@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 969dd0cf
...@@ -370,20 +370,13 @@ static int mv88q2xxx_config_aneg(struct phy_device *phydev) ...@@ -370,20 +370,13 @@ static int mv88q2xxx_config_aneg(struct phy_device *phydev)
static int mv88q2xxx_config_init(struct phy_device *phydev) static int mv88q2xxx_config_init(struct phy_device *phydev)
{ {
int ret;
/* The 88Q2XXX PHYs do have the extended ability register available, but /* The 88Q2XXX PHYs do have the extended ability register available, but
* register MDIO_PMA_EXTABLE where they should signalize it does not * register MDIO_PMA_EXTABLE where they should signalize it does not
* work according to specification. Therefore, we force it here. * work according to specification. Therefore, we force it here.
*/ */
phydev->pma_extable = MDIO_PMA_EXTABLE_BT1; phydev->pma_extable = MDIO_PMA_EXTABLE_BT1;
/* Read the current PHY configuration */ return 0;
ret = genphy_c45_read_pma(phydev);
if (ret)
return ret;
return mv88q2xxx_config_aneg(phydev);
} }
static int mv88q2xxx_get_sqi(struct phy_device *phydev) static int mv88q2xxx_get_sqi(struct phy_device *phydev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment