mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: Raju Rangoju <Raju.Rangoju@amd.com> Link: https://patch.msgid.link/20251123163721.442162-1-Raju.Rangoju@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
ce69978ae8
commit
f93505f357
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user