Commit a8ba129a authored by Raju Rangoju's avatar Raju Rangoju Committed by Paolo Abeni
Browse files

amd-xgbe: reset PHY settings before starting PHY



commit f93505f3 ("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: f93505f3 ("amd-xgbe: let the MAC manage PHY PM")
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: default avatarRaju Rangoju <Raju.Rangoju@amd.com>
Link: https://patch.msgid.link/20260306111629.1515676-4-Raju.Rangoju@amd.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 27a4dd0c
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -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);