summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2022-06-20 11:28:39 +0200
committerJakub Kicinski <kuba@kernel.org>2022-06-22 06:55:09 +0200
commitb1f01b4bd7ad7f642d896cb9d6f82ec34043b612 (patch)
treeb4e096f3f087ef42f4e31fc9f998e84355cb8a7c /drivers/net/phy
parentMerge branch 'net-dsa-microchip-common-spi-probe-for-the-ksz-series-switches-... (diff)
downloadlinux-b1f01b4bd7ad7f642d896cb9d6f82ec34043b612.tar.xz
linux-b1f01b4bd7ad7f642d896cb9d6f82ec34043b612.zip
net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw()
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> Link: https://lore.kernel.org/r/0254edf48bddc96c6248c4414043a3699e94614a.1655716767.git.lukas@wunner.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/smsc.c13
1 files changed, 1 insertions, 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,