]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
amd-xgbe: reset PHY settings before starting PHY
authorRaju Rangoju <Raju.Rangoju@amd.com>
Fri, 6 Mar 2026 11:16:29 +0000 (16:46 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Mar 2026 11:07:07 +0000 (12:07 +0100)
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")
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>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c

index 39da2f811858979c520fb3bca9fb31ea340ea682..23beea48ae26ba87af05414bdbbb45cf64e89ed5 100644 (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);