net: phy: smsc: simplify lan95xx_config_aneg_ext
Subsystems (3)
Heiner Kallweit
maintainerPATCH 1/1 net: phy: smsc: simplify lan95xx_config_aneg_ext
lan95xx_config_aneg_ext() can be simplified by using phy_set_bits().
Signed-off-by Heiner Kallweit <[email protected]>
--- drivers/net/phy/smsc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/net/phy/smsc.c +7 -10
@@ -167,18 +167,15 @@ static int lan87xx_config_aneg(struct phy_device *phydev)static int lan95xx_config_aneg_ext (struct phy_device *phydev) { -int rc; - -if (phydev->phy_id !=0x0007c0f0 )/* not (LAN9500A or LAN9505A) */ -return lan87xx_config_aneg (phydev); +if (phydev->phy_id ==0x0007c0f0 ) {/* LAN9500A or LAN9505A */ +/* Extend Manual AutoMDIX timer */ +int rc =phy_set_bits (phydev,PHY_EDPD_CONFIG , +PHY_EDPD_CONFIG_EXT_CROSSOVER_ ); -/* Extend Manual AutoMDIX timer */ - rc =phy_read (phydev,PHY_EDPD_CONFIG ); -if (rc <0 ) -return rc; +if (rc <0 ) +return rc; + } - rc |=PHY_EDPD_CONFIG_EXT_CROSSOVER_ ; -phy_write (phydev,PHY_EDPD_CONFIG , rc);return lan87xx_config_aneg (phydev); }
Signature · 1 line
2.39.2
Quoted 3 lines · Heiner Kallweit
lan95xx_config_aneg_ext()can be simplified by usingphy_set_bits().Signed-off-by Heiner Kallweit <[email protected]>
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Mon, 6 Mar 2023 23:10:57 +0100 you wrote:
lan95xx_config_aneg_ext()can be simplified by usingphy_set_bits().Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/phy/smsc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
Here is the summary with links:
- [net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext
https://git.kernel.org/netdev/net-next/c/4310e2f42030
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html