Commit f93505f3 authored by Raju Rangoju's avatar Raju Rangoju Committed by Jakub Kicinski
Browse files

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.

Signed-off-by: default avatarRaju Rangoju <Raju.Rangoju@amd.com>
Link: https://patch.msgid.link/20251123163721.442162-1-Raju.Rangoju@amd.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ce69978a
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -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) {
+1 −0
Original line number Diff line number Diff line
@@ -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);