Skip to contentSkip to conversation

amd-xgbe: let the MAC manage PHY PM

PATCH Applied Raju Rangoju 2 participants 2 messages Nov 23, 2025 – Nov 27, 2025

Subsystems (3)
lore
Share & tools
lore

Raju Rangoju

author maintainer
#0 lore raw

PATCH v2 1/1 amd-xgbe: let the MAC manage PHY PM

Use the MAC managed PM flag to indicate that MAC driver takes care of suspending/resuming the PHY, and reset it when the device is brought up.

---
Changes since v1:
- remove the first call to xgbe_phy_reset() in .ndo_open

 drivers/net/ethernet/amd/xgbe/xgbe-drv.c    | 14 +++++++++-----
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |  1 +
 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +9 -5
index f3adf29b222b..0653e69f0ef7 100644
@@ -1259,6 +1259,11 @@ 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);
@@ -1268,6 +1273,10 @@ 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);
 
@@ -1574,11 +1583,6 @@ static int xgbe_open(struct net_device *netdev)
 		goto err_dev_wq;
 	}
 
-	/* Reset the phy settings */
-	ret = xgbe_phy_reset(pdata);
-	if (ret)
-		goto err_an_wq;
-
 	/* Enable the clocks */
 	ret = clk_prepare_enable(pdata->sysclk);
 	if (ret) {
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +1 -0
index 35a381a83647..a68757e8fd22 100644
@@ -989,6 +989,7 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
 		return ret;
 	}
 	phy_data->phydev = phydev;
+	phy_data->phydev->mac_managed_pm = true;
 
 	xgbe_phy_external_phy_quirks(pdata);
 
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Sun, 23 Nov 2025 22:07:21 +0530 you wrote:

Use the MAC managed PM flag to indicate that MAC driver takes care of suspending/resuming the PHY, and reset it when the device is brought up.

---
Changes since v1:
- remove the first call to xgbe_phy_reset() in .ndo_open

[...]

Here is the summary with links:
- [net-next,v2] amd-xgbe: let the MAC manage PHY PM

    https://git.kernel.org/netdev/net-next/c/f93505f35745

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html