[PATCH net 3/3] amd-xgbe: reset PHY settings before starting PHY

From: Raju Rangoju

Date: Wed Mar 04 2026 - 07:28:00 EST


commit f93505f35745 ("amd-xgbe: let the MAC manage PHY PM") moved
xgbe_phy_reset() from xgbe_open() to xgbe_start(), placing it after
phy_start(). As a result, the PHY settings were being reset after the
PHY had already started.

Reorder the calls so that the PHY settings are reset before
phy_start() is invoked.

Fixes: f93505f35745 ("amd-xgbe: let the MAC manage PHY PM")
Signed-off-by: Raju Rangoju <Raju.Rangoju@xxxxxxx>
---
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 8b79d88480db..fd4f451efcb2 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1271,6 +1271,12 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
if (ret)
goto err_napi;

+ /* Reset the phy settings */
+ ret = xgbe_phy_reset(pdata);
+ if (ret)
+ goto err_irqs;
+
+ /* Start the phy */
ret = phy_if->phy_start(pdata);
if (ret)
goto err_irqs;
@@ -1280,11 +1286,6 @@ static int xgbe_start(struct xgbe_prv_data *pdata)

udp_tunnel_nic_reset_ntf(netdev);

- /* Reset the phy settings */
- ret = xgbe_phy_reset(pdata);
- if (ret)
- goto err_txrx;
-
netif_tx_start_all_queues(netdev);

xgbe_start_timers(pdata);
@@ -1294,10 +1295,6 @@ static int xgbe_start(struct xgbe_prv_data *pdata)

return 0;

-err_txrx:
- hw_if->disable_rx(pdata);
- hw_if->disable_tx(pdata);
-
err_irqs:
xgbe_free_irqs(pdata);

--
2.34.1