amd-xgbe: reset PHY settings before starting PHY

commit f93505f357 ("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: f93505f357 ("amd-xgbe: let the MAC manage PHY PM")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Link: https://patch.msgid.link/20260306111629.1515676-4-Raju.Rangoju@amd.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Raju Rangoju 2026-03-06 16:46:29 +05:30 committed by Paolo Abeni
parent 27a4dd0c70
commit a8ba129af4

View File

@ -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;
@ -1284,11 +1290,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);
@ -1298,10 +1299,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);