net: lan743x: Fix PHY reset handling during initialization and WOL
[ Upstream commit 82d1096ca8b5dbb3158d707e6fb3ad21c3403a49 ]
Remove lan743x_phy_init from lan743x_hardware_init as it resets the PHY
registers, causing WOL to fail on subsequent attempts. Add a call to
lan743x_hw_reset_phy in the probe function to ensure the PHY is reset
during device initialization.
Fixes: 23f0703c12 ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250526053048.287095-3-thangaraj.s@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0e5c90c2ae
commit
4b073a575b
@@ -1346,11 +1346,6 @@ static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)
|
||||
50000, 1000000);
|
||||
}
|
||||
|
||||
static int lan743x_phy_init(struct lan743x_adapter *adapter)
|
||||
{
|
||||
return lan743x_hw_reset_phy(adapter);
|
||||
}
|
||||
|
||||
static void lan743x_phy_interface_select(struct lan743x_adapter *adapter)
|
||||
{
|
||||
u32 id_rev;
|
||||
@@ -3505,10 +3500,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;
|
||||
@@ -3642,6 +3633,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;
|
||||
|
||||
Reference in New Issue
Block a user