* [PATCH net-next] amd-xgbe: let the MAC manage PHY PM
@ 2025-11-19 9:31 Raju Rangoju
2025-11-19 15:57 ` Maxime Chevallier
0 siblings, 1 reply; 3+ messages in thread
From: Raju Rangoju @ 2025-11-19 9:31 UTC (permalink / raw)
To: netdev
Cc: pabeni, kuba, edumazet, davem, andrew+netdev, Shyam-sundar.S-k,
Raju Rangoju
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>
---
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index f3adf29b222b..1c03fb138ce6 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1266,6 +1266,9 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
clear_bit(XGBE_STOPPED, &pdata->dev_state);
+ /* Reset the phy settings */
+ xgbe_phy_reset(pdata);
+
return 0;
err_irqs:
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 35a381a83647..a68757e8fd22 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] amd-xgbe: let the MAC manage PHY PM
2025-11-19 9:31 [PATCH net-next] amd-xgbe: let the MAC manage PHY PM Raju Rangoju
@ 2025-11-19 15:57 ` Maxime Chevallier
2025-11-21 10:22 ` Rangoju, Raju
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Chevallier @ 2025-11-19 15:57 UTC (permalink / raw)
To: Raju Rangoju, netdev
Cc: pabeni, kuba, edumazet, davem, andrew+netdev, Shyam-sundar.S-k
Hi Raju,
On 19/11/2025 10:31, Raju Rangoju 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.
>
> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++
> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> index f3adf29b222b..1c03fb138ce6 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> @@ -1266,6 +1266,9 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
>
> clear_bit(XGBE_STOPPED, &pdata->dev_state);
>
> + /* Reset the phy settings */
> + xgbe_phy_reset(pdata);
> +
At a first glance, this looks like 2 different things, so maybe 2
different patches ?
That said, with this change does it still make sense to call
xgbe_phy_reset() in xgbe_open() ?
With this patch we have :
xgpe_open() {
xgbe_phy_reset();
xgbe_start() {
xgbe_phy_reset(); /* again */
}
}
Can you remove the first call in .ndo_open ?
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] amd-xgbe: let the MAC manage PHY PM
2025-11-19 15:57 ` Maxime Chevallier
@ 2025-11-21 10:22 ` Rangoju, Raju
0 siblings, 0 replies; 3+ messages in thread
From: Rangoju, Raju @ 2025-11-21 10:22 UTC (permalink / raw)
To: Maxime Chevallier, netdev
Cc: pabeni, kuba, edumazet, davem, andrew+netdev, Shyam-sundar.S-k
On 11/19/2025 9:27 PM, Maxime Chevallier wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Hi Raju,
>
> On 19/11/2025 10:31, Raju Rangoju 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.
>>
>> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
>> ---
>> drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++
>> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
>> index f3adf29b222b..1c03fb138ce6 100644
>> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
>> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
>> @@ -1266,6 +1266,9 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
>>
>> clear_bit(XGBE_STOPPED, &pdata->dev_state);
>>
>> + /* Reset the phy settings */
>> + xgbe_phy_reset(pdata);
>> +
>
> At a first glance, this looks like 2 different things, so maybe 2
> different patches ?
>
Hi Maxime,
Patch is setting MAC managed PM flag and moving the reset to appropriate
place. Do you see a need for separate patch for this?
> That said, with this change does it still make sense to call
> xgbe_phy_reset() in xgbe_open() ?
No, calling it in xgbe_open() isn't needed.
>
> With this patch we have :
>
> xgpe_open() {
>
> xgbe_phy_reset();
>
> xgbe_start() {
> xgbe_phy_reset(); /* again */
> }
> }
>
> Can you remove the first call in .ndo_open ?
sure, I'll take of this in V2.
>
> Maxime
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-21 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-19 9:31 [PATCH net-next] amd-xgbe: let the MAC manage PHY PM Raju Rangoju
2025-11-19 15:57 ` Maxime Chevallier
2025-11-21 10:22 ` Rangoju, Raju
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.