Re: 回覆: [net v2] net: ftgmac100: refactor getting phy device handle

From: Simon Horman
Date: Tue Oct 22 2024 - 03:34:16 EST


On Tue, Oct 22, 2024 at 07:13:56AM +0000, Jacky Chou wrote:
> Hi Simon
>
> Thank you for your reply.
>
> > > 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.
> >
> > Hi Jacky,
> >
> > I understand the aim of this patch, and I think it is nice that we can drop about
> > 20 lines of code. But I did have some trouble understanding the paragraph
> > above. I wonder if the following is clearer:
> >
> > Consolidate the handling of dedicated PHY and fixed-link phy by taking
> > advantage of logic in of_phy_get_and_connect() which handles both of
> > these cases, rather than open coding the same logic in ftgmac100_probe().
> >
>
> Agree. I will change the commit message.
> Thank you for helping me fine-tune this message.
>
> > >
> > > Signed-off-by: Jacky Chou <jacky_chou@xxxxxxxxxxxxxx>
> > > ---
> > > v2:
> > > - enable mac asym pause support for fixed-link PHY
> > > - remove fixes information
> >
> > I agree that this is not a fix. And should not have a Fixes tag and so on.
> > But as such it should be targeted at net rather than net-next.
> >
> > Subject: [net-next vX] ...
> >
> > The code themselves changes look good to me. But I think the two points above,
> > in combination, warrant a v3.
>
> I will send v3 patch to net-next tree.

Great, thanks Jacky.