Commit 8c6790b5 authored by Jian Hui Lee's avatar Jian Hui Lee Committed by Paolo Abeni

net: ethernet: mtk-star-emac: set mac_managed_pm when probing

The below commit introduced a warning message when phy state is not in
the states: PHY_HALTED, PHY_READY, and PHY_UP.
commit 744d23c7 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")

mtk-star-emac doesn't need mdiobus suspend/resume. To fix the warning
message during resume, indicate the phy resume/suspend is managed by the
mac when probing.

Fixes: 744d23c7 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
Signed-off-by: default avatarJian Hui Lee <jianhui.lee@canonical.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240708065210.4178980-1-jianhui.lee@canonical.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 76a0a3f9
...@@ -1524,6 +1524,7 @@ static int mtk_star_probe(struct platform_device *pdev) ...@@ -1524,6 +1524,7 @@ static int mtk_star_probe(struct platform_device *pdev)
{ {
struct device_node *of_node; struct device_node *of_node;
struct mtk_star_priv *priv; struct mtk_star_priv *priv;
struct phy_device *phydev;
struct net_device *ndev; struct net_device *ndev;
struct device *dev; struct device *dev;
void __iomem *base; void __iomem *base;
...@@ -1649,6 +1650,12 @@ static int mtk_star_probe(struct platform_device *pdev) ...@@ -1649,6 +1650,12 @@ static int mtk_star_probe(struct platform_device *pdev)
netif_napi_add(ndev, &priv->rx_napi, mtk_star_rx_poll); netif_napi_add(ndev, &priv->rx_napi, mtk_star_rx_poll);
netif_napi_add_tx(ndev, &priv->tx_napi, mtk_star_tx_poll); netif_napi_add_tx(ndev, &priv->tx_napi, mtk_star_tx_poll);
phydev = of_phy_find_device(priv->phy_node);
if (phydev) {
phydev->mac_managed_pm = true;
put_device(&phydev->mdio.dev);
}
return devm_register_netdev(dev, ndev); return devm_register_netdev(dev, ndev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment