net: phylink: add mac_managed_pm in phylink_config structure
authorShenwei Wang <shenwei.wang@nxp.com>
Fri, 14 Oct 2022 14:47:28 +0000 (09:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:12:56 +0000 (10:12 +0200)
commitb9122e0e0ea85997e481db5062f867c797cd229b
treeebf80eabfc8fb83d80e8cde307ac157a570d31ef
parent412db9b06d3cc7978c4d91d0c2d8f394926ce340
net: phylink: add mac_managed_pm in phylink_config structure

[ Upstream commit 96de900ae78e7dbedc937fd91bafe2934579c65a ]

The recent commit

'commit 744d23c71af3 ("net: phy: Warn about incorrect
mdio_bus_phy_resume() state")'

requires the MAC driver explicitly tell the phy driver who is
managing the PM, otherwise you will see warning during resume
stage.

Add a boolean property in the phylink_config structure so that
the MAC driver can use it to tell the PHY driver if it wants to
manage the PM.

Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/phylink.c
include/linux/phylink.h