Skip to content

Commit 82d1096

Browse files
Thangaraj Samynathankuba-moo
authored andcommitted
net: lan743x: Fix PHY reset handling during initialization and WOL
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: 23f0703 ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Thangaraj Samynathan <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 68927eb commit 82d1096

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,6 @@ static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)
13461346
50000, 1000000);
13471347
}
13481348

1349-
static int lan743x_phy_init(struct lan743x_adapter *adapter)
1350-
{
1351-
return lan743x_hw_reset_phy(adapter);
1352-
}
1353-
13541349
static void lan743x_phy_interface_select(struct lan743x_adapter *adapter)
13551350
{
13561351
u32 id_rev;
@@ -3534,10 +3529,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
35343529
if (ret)
35353530
return ret;
35363531

3537-
ret = lan743x_phy_init(adapter);
3538-
if (ret)
3539-
return ret;
3540-
35413532
ret = lan743x_ptp_init(adapter);
35423533
if (ret)
35433534
return ret;
@@ -3674,6 +3665,10 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
36743665
if (ret)
36753666
goto cleanup_pci;
36763667

3668+
ret = lan743x_hw_reset_phy(adapter);
3669+
if (ret)
3670+
goto cleanup_pci;
3671+
36773672
ret = lan743x_hardware_init(adapter, pdev);
36783673
if (ret)
36793674
goto cleanup_pci;

0 commit comments

Comments
 (0)