aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-05-27 17:52:03 -0700
committerJakub Kicinski <kuba@kernel.org>2025-05-27 17:52:04 -0700
commit65484f9dfd3c707f0bb9a615ec987bb82d6e3e7d (patch)
treedadc7a4ec66081de6c9db8a4e2c7487c13e77379
parentnet: macb: Check return value of dma_set_mask_and_coherent() (diff)
parentnet: lan743x: Fix PHY reset handling during initialization and WOL (diff)
downloadwireguard-linux-65484f9dfd3c707f0bb9a615ec987bb82d6e3e7d.tar.xz
wireguard-linux-65484f9dfd3c707f0bb9a615ec987bb82d6e3e7d.zip
Merge branch 'refactor-phy-reset-handling-and'
Thangaraj Samynathan says: ==================== Refactor PHY reset handling and fix WOL This patch series refines the PHY reset and initialization logic in the lan743x driver. Enhance the robustness of the driver initialization process and prevent WOL-related issues during suspend/resume cycles. ==================== Link: https://patch.msgid.link/20250526053048.287095-1-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index a70b88037a20..7f36443832ad 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1330,7 +1330,7 @@ static int lan743x_mac_set_mtu(struct lan743x_adapter *adapter, int new_mtu)
}
/* PHY */
-static int lan743x_phy_reset(struct lan743x_adapter *adapter)
+static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)
{
u32 data;
@@ -1346,11 +1346,6 @@ static int lan743x_phy_reset(struct lan743x_adapter *adapter)
50000, 1000000);
}
-static int lan743x_phy_init(struct lan743x_adapter *adapter)
-{
- return lan743x_phy_reset(adapter);
-}
-
static void lan743x_phy_interface_select(struct lan743x_adapter *adapter)
{
u32 id_rev;
@@ -3534,10 +3529,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
if (ret)
return ret;
- ret = lan743x_phy_init(adapter);
- if (ret)
- return ret;
-
ret = lan743x_ptp_init(adapter);
if (ret)
return ret;
@@ -3674,6 +3665,10 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
if (ret)
goto cleanup_pci;
+ ret = lan743x_hw_reset_phy(adapter);
+ if (ret)
+ goto cleanup_pci;
+
ret = lan743x_hardware_init(adapter, pdev);
if (ret)
goto cleanup_pci;