* [PATCH net-next] net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw()
@ 2022-06-20 9:28 Lukas Wunner
2022-06-22 5:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wunner @ 2022-06-20 9:28 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
Andrew Lunn, Heiner Kallweit, Russell King
Cc: netdev, Andre Edich
Since commit 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut
off PHY power"), phy_init_hw() invokes both, the ->config_init() and
->config_intr() callbacks.
In the SMSC PHY driver, the latter acknowledges stale interrupts, hence
there's no longer a need to acknowledge them in the former as well.
There are no other callers of ->config_init() besides phy_init_hw().
Drop the redundant code.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
drivers/net/phy/smsc.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 1b54684b68a0..dcd160785f95 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -121,10 +121,7 @@ static int smsc_phy_config_init(struct phy_device *phydev)
/* Enable energy detect mode for this SMSC Transceivers */
rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS,
rc | MII_LAN83C185_EDPWRDOWN);
- if (rc < 0)
- return rc;
-
- return smsc_phy_ack_interrupt(phydev);
+ return rc;
}
static int smsc_phy_reset(struct phy_device *phydev)
@@ -146,11 +143,6 @@ static int smsc_phy_reset(struct phy_device *phydev)
return genphy_soft_reset(phydev);
}
-static int lan911x_config_init(struct phy_device *phydev)
-{
- return smsc_phy_ack_interrupt(phydev);
-}
-
static int lan87xx_config_aneg(struct phy_device *phydev)
{
int rc;
@@ -418,9 +410,6 @@ static struct phy_driver smsc_phy_driver[] = {
.probe = smsc_phy_probe,
- /* basic functions */
- .config_init = lan911x_config_init,
-
/* IRQ related */
.config_intr = smsc_phy_config_intr,
.handle_interrupt = smsc_phy_handle_interrupt,
--
2.35.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw()
2022-06-20 9:28 [PATCH net-next] net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw() Lukas Wunner
@ 2022-06-22 5:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-22 5:50 UTC (permalink / raw)
To: Lukas Wunner
Cc: davem, kuba, pabeni, edumazet, andrew, hkallweit1, linux, netdev,
andre.edich
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 20 Jun 2022 11:28:39 +0200 you wrote:
> Since commit 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut
> off PHY power"), phy_init_hw() invokes both, the ->config_init() and
> ->config_intr() callbacks.
>
> In the SMSC PHY driver, the latter acknowledges stale interrupts, hence
> there's no longer a need to acknowledge them in the former as well.
>
> [...]
Here is the summary with links:
- [net-next] net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw()
https://git.kernel.org/netdev/net-next/c/b1f01b4bd7ad
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] 2+ messages in thread
end of thread, other threads:[~2022-06-22 5:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 9:28 [PATCH net-next] net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw() Lukas Wunner
2022-06-22 5:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.