Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrew Lunn <andrew@lunn.ch>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Link: https://lore.kernel.org/r/20240218075753.18067-13-dima.fedrau@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dimitri Fedrau and committed by
Jakub Kicinski
ec266094 969dd0cf

+1 -8
+1 -8
drivers/net/phy/marvell-88q2xxx.c
··· 370 370 371 371 static int mv88q2xxx_config_init(struct phy_device *phydev) 372 372 { 373 - int ret; 374 - 375 373 /* The 88Q2XXX PHYs do have the extended ability register available, but 376 374 * register MDIO_PMA_EXTABLE where they should signalize it does not 377 375 * work according to specification. Therefore, we force it here. 378 376 */ 379 377 phydev->pma_extable = MDIO_PMA_EXTABLE_BT1; 380 378 381 - /* Read the current PHY configuration */ 382 - ret = genphy_c45_read_pma(phydev); 383 - if (ret) 384 - return ret; 385 - 386 - return mv88q2xxx_config_aneg(phydev); 379 + return 0; 387 380 } 388 381 389 382 static int mv88q2xxx_get_sqi(struct phy_device *phydev)