lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1f22f79-1494-45b5-9c89-f18c1b10b19a@intel.com>
Date: Wed, 10 Jul 2024 14:56:01 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jian Hui Lee <jianhui.lee@...onical.com>, Felix Fietkau <nbd@....name>,
	Sean Wang <sean.wang@...iatek.com>, Mark Lee <Mark-MC.Lee@...iatek.com>,
	Lorenzo Bianconi <lorenzo@...nel.org>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Matthias Brugger
	<matthias.bgg@...il.com>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, Florian Fainelli
	<f.fainelli@...il.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v2 net] net: ethernet: mtk-star-emac: set mac_managed_pm
 when probing



On 7/7/2024 11:52 PM, Jian Hui Lee wrote:
> The below commit introduced a warning message when phy state is not in
> the states: PHY_HALTED, PHY_READY, and PHY_UP.
> commit 744d23c71af3 ("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: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
> Signed-off-by: Jian Hui Lee <jianhui.lee@...onical.com>
> ---
> v2: apply reverse x-mas tree order declaration
> 

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

> v1: https://lore.kernel.org/netdev/20240703061840.3137496-1-jianhui.lee@canonical.com/
> 
>  drivers/net/ethernet/mediatek/mtk_star_emac.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
> index 31aebeb2e285..25989c79c92e 100644
> --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
> +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
> @@ -1524,6 +1524,7 @@ static int mtk_star_probe(struct platform_device *pdev)
>  {
>  	struct device_node *of_node;
>  	struct mtk_star_priv *priv;
> +	struct phy_device *phydev;
>  	struct net_device *ndev;
>  	struct device *dev;
>  	void __iomem *base;
> @@ -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_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);
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ