* [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext
@ 2023-03-06 22:10 Heiner Kallweit
2023-03-07 15:40 ` Simon Horman
2023-03-08 8:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2023-03-06 22:10 UTC (permalink / raw)
To: Andrew Lunn, Russell King - ARM Linux, Paolo Abeni,
Jakub Kicinski, David Miller, Eric Dumazet
Cc: netdev@vger.kernel.org
lan95xx_config_aneg_ext() can be simplified by using phy_set_bits().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/smsc.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index be96c474c..0e9fcbe33 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -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);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext
2023-03-06 22:10 [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext Heiner Kallweit
@ 2023-03-07 15:40 ` Simon Horman
2023-03-08 8:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-03-07 15:40 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Andrew Lunn, Russell King - ARM Linux, Paolo Abeni,
Jakub Kicinski, David Miller, Eric Dumazet,
netdev@vger.kernel.org
On Mon, Mar 06, 2023 at 11:10:57PM +0100, Heiner Kallweit wrote:
> lan95xx_config_aneg_ext() can be simplified by using phy_set_bits().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext
2023-03-06 22:10 [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext Heiner Kallweit
2023-03-07 15:40 ` Simon Horman
@ 2023-03-08 8:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-08 8:20 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: andrew, linux, pabeni, kuba, davem, edumazet, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 6 Mar 2023 23:10:57 +0100 you wrote:
> lan95xx_config_aneg_ext() can be simplified by using phy_set_bits().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-08 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 22:10 [PATCH net-next] net: phy: smsc: simplify lan95xx_config_aneg_ext Heiner Kallweit
2023-03-07 15:40 ` Simon Horman
2023-03-08 8:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).