Skip to content

Commit a8ba129

Browse files
RajuRangojuPaolo Abeni
authored andcommitted
amd-xgbe: reset PHY settings before starting PHY
commit f93505f ("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: f93505f ("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>
1 parent 27a4dd0 commit a8ba129

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

drivers/net/ethernet/amd/xgbe/xgbe-drv.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,12 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
12711271
if (ret)
12721272
goto err_napi;
12731273

1274+
/* Reset the phy settings */
1275+
ret = xgbe_phy_reset(pdata);
1276+
if (ret)
1277+
goto err_irqs;
1278+
1279+
/* Start the phy */
12741280
ret = phy_if->phy_start(pdata);
12751281
if (ret)
12761282
goto err_irqs;
@@ -1284,11 +1290,6 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
12841290

12851291
udp_tunnel_nic_reset_ntf(netdev);
12861292

1287-
/* Reset the phy settings */
1288-
ret = xgbe_phy_reset(pdata);
1289-
if (ret)
1290-
goto err_txrx;
1291-
12921293
netif_tx_start_all_queues(netdev);
12931294

12941295
xgbe_start_timers(pdata);
@@ -1298,10 +1299,6 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
12981299

12991300
return 0;
13001301

1301-
err_txrx:
1302-
hw_if->disable_rx(pdata);
1303-
hw_if->disable_tx(pdata);
1304-
13051302
err_irqs:
13061303
xgbe_free_irqs(pdata);
13071304

0 commit comments

Comments
 (0)