summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@broadcom.com>2024-02-15 21:27:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-01 15:35:07 +0300
commitae24a16a834324f9277c3162178c9a3fed9a8e44 (patch)
tree9e7caf3507d4e89eabc297e1c5cdc3fd01068cc0 /drivers/net
parentcf761c81e413c9ed1e92ac47951548108370a139 (diff)
downloadlinux-ae24a16a834324f9277c3162178c9a3fed9a8e44.tar.xz
net: bcmasp: Indicate MAC is in charge of PHY PM
[ Upstream commit 5b76d928f8b779a1b19c5842e7cabee4cbb610c3 ] Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The ASP driver essentially does exactly what mdio_bus_phy_resume() does. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Justin Chen <justin.chen@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
index 53e542881255..9cae5a309000 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
@@ -1048,6 +1048,9 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect)
netdev_err(dev, "could not attach to PHY\n");
goto err_phy_disable;
}
+
+ /* Indicate that the MAC is responsible for PHY PM */
+ phydev->mac_managed_pm = true;
} else if (!intf->wolopts) {
ret = phy_resume(dev->phydev);
if (ret)