[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be591afe-d70b-4208-a189-40e65227ad14@lunn.ch>
Date: Sat, 12 Oct 2024 19:17:48 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jacky Chou <jacky_chou@...eedtech.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, jacob.e.keller@...el.com, rentao.bupt@...il.com,
f.fainelli@...il.com, andrew@...id.au, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [net] net: ftgmac100: refactor getting phy device handle
On Fri, Oct 11, 2024 at 04:16:33PM +0800, Jacky Chou wrote:
> The ftgmac100 supports NC-SI mode, dedicated PHY and fixed-link
> PHY. The dedicated PHY is using the phy_handle property to get
> phy device handle and the fixed-link phy is using the fixed-link
> property to register a fixed-link phy device.
>
> In of_phy_get_and_connect function, it help driver to get and register
> these PHYs handle.
> Therefore, here refactors this part by using of_phy_get_and_connect.
>
> Fixes: 38561ded50d0 ("net: ftgmac100: support fixed link")
> Fixes: 39bfab8844a0 ("net: ftgmac100: Add support for DT phy-handle property")
Fixes: implies something is broken. What is actually wrong with this
code? What sort of problem does a user see?
> - phy_support_asym_pause(phy);
> + if (of_get_property(np, "phy-handle", NULL))
> + phy_support_asym_pause(phy);
This is probably wrong. This is the MAC layer telling phylib that the
MAC supports asym pause. It should makes no difference to the MAC what
sort of PHY is being used, all the MAC is looking at/sending is pause
frames.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists