* [PATCH v2] net: macb: Specify PHY PM management done by MAC
@ 2022-10-19 12:09 Sergiu Moga
2022-10-19 23:37 ` Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sergiu Moga @ 2022-10-19 12:09 UTC (permalink / raw)
To: nicolas.ferre, claudiu.beznea, davem, edumazet, kuba, pabeni,
linux, f.fainelli, tudor.ambarus
Cc: netdev, linux-kernel, Sergiu Moga
The `macb_resume`/`macb_suspend` methods already call the
`phylink_start`/`phylink_stop` methods during their execution so
explicitly say that the PM of the PHY is done by MAC by using the
`mac_managed_pm` flag of the `struct phylink_config`.
This also fixes the warning message issued during resume:
WARNING: CPU: 0 PID: 237 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0x144/0x148
Depends-on: 96de900ae78e ("net: phylink: add mac_managed_pm in phylink_config structure")
Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
v1 -> v2:
- Add Depends-on: tag
drivers/net/ethernet/cadence/macb_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 51c9fd6f68a4..4f63f1ba3161 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -806,6 +806,7 @@ static int macb_mii_probe(struct net_device *dev)
bp->phylink_config.dev = &dev->dev;
bp->phylink_config.type = PHYLINK_NETDEV;
+ bp->phylink_config.mac_managed_pm = true;
if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
bp->phylink_config.poll_fixed_state = true;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: macb: Specify PHY PM management done by MAC
2022-10-19 12:09 [PATCH v2] net: macb: Specify PHY PM management done by MAC Sergiu Moga
@ 2022-10-19 23:37 ` Florian Fainelli
2022-10-20 8:14 ` Claudiu.Beznea
2022-10-21 5:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2022-10-19 23:37 UTC (permalink / raw)
To: Sergiu Moga, nicolas.ferre, claudiu.beznea, davem, edumazet,
kuba, pabeni, linux, tudor.ambarus
Cc: netdev, linux-kernel
On 10/19/2022 5:09 AM, Sergiu Moga wrote:
> The `macb_resume`/`macb_suspend` methods already call the
> `phylink_start`/`phylink_stop` methods during their execution so
> explicitly say that the PM of the PHY is done by MAC by using the
> `mac_managed_pm` flag of the `struct phylink_config`.
>
> This also fixes the warning message issued during resume:
> WARNING: CPU: 0 PID: 237 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0x144/0x148
>
> Depends-on: 96de900ae78e ("net: phylink: add mac_managed_pm in phylink_config structure")
> Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Makes me realize we need to do the same in DSA, I will cook a patch soon.
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: macb: Specify PHY PM management done by MAC
2022-10-19 12:09 [PATCH v2] net: macb: Specify PHY PM management done by MAC Sergiu Moga
2022-10-19 23:37 ` Florian Fainelli
@ 2022-10-20 8:14 ` Claudiu.Beznea
2022-10-21 5:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Claudiu.Beznea @ 2022-10-20 8:14 UTC (permalink / raw)
To: Sergiu.Moga, Nicolas.Ferre, davem, edumazet, kuba, pabeni, linux,
f.fainelli, Tudor.Ambarus
Cc: netdev, linux-kernel
On 19.10.2022 15:09, Sergiu Moga wrote:
> The `macb_resume`/`macb_suspend` methods already call the
> `phylink_start`/`phylink_stop` methods during their execution so
> explicitly say that the PM of the PHY is done by MAC by using the
> `mac_managed_pm` flag of the `struct phylink_config`.
>
> This also fixes the warning message issued during resume:
> WARNING: CPU: 0 PID: 237 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0x144/0x148
>
> Depends-on: 96de900ae78e ("net: phylink: add mac_managed_pm in phylink_config structure")
> Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>
>
> v1 -> v2:
> - Add Depends-on: tag
>
>
> drivers/net/ethernet/cadence/macb_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 51c9fd6f68a4..4f63f1ba3161 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -806,6 +806,7 @@ static int macb_mii_probe(struct net_device *dev)
>
> bp->phylink_config.dev = &dev->dev;
> bp->phylink_config.type = PHYLINK_NETDEV;
> + bp->phylink_config.mac_managed_pm = true;
>
> if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
> bp->phylink_config.poll_fixed_state = true;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net: macb: Specify PHY PM management done by MAC
2022-10-19 12:09 [PATCH v2] net: macb: Specify PHY PM management done by MAC Sergiu Moga
2022-10-19 23:37 ` Florian Fainelli
2022-10-20 8:14 ` Claudiu.Beznea
@ 2022-10-21 5:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-21 5:10 UTC (permalink / raw)
To: Sergiu Moga
Cc: nicolas.ferre, claudiu.beznea, davem, edumazet, kuba, pabeni,
linux, f.fainelli, tudor.ambarus, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 19 Oct 2022 15:09:32 +0300 you wrote:
> The `macb_resume`/`macb_suspend` methods already call the
> `phylink_start`/`phylink_stop` methods during their execution so
> explicitly say that the PM of the PHY is done by MAC by using the
> `mac_managed_pm` flag of the `struct phylink_config`.
>
> This also fixes the warning message issued during resume:
> WARNING: CPU: 0 PID: 237 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0x144/0x148
>
> [...]
Here is the summary with links:
- [v2] net: macb: Specify PHY PM management done by MAC
https://git.kernel.org/netdev/net/c/15a9dbec631c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-21 5:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 12:09 [PATCH v2] net: macb: Specify PHY PM management done by MAC Sergiu Moga
2022-10-19 23:37 ` Florian Fainelli
2022-10-20 8:14 ` Claudiu.Beznea
2022-10-21 5:10 ` patchwork-bot+netdevbpf
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.