Re: [RFC net 1/1] net: stmmac: skip PHY scanning when PHY already attached in DT mode

From: Martin Blumenstingl
Date: Tue Apr 04 2023 - 17:19:11 EST


On Tue, Apr 4, 2023 at 11:15 AM Michael Sit Wei Hong
<michael.wei.hong.sit@xxxxxxxxx> wrote:
>
> If PHY is successfully attached during phylink_fwnode_phy_connect()
> in DT mode. MAC should not need to scan for PHY again.
>
> Adding a logic to check if ovr_an_inband is set before scanning for
> a PHY, since phylink_fwnode_phy_connect() returns 0 when
>
> phy_fwnode = fwnode_get_phy_node(fwnode);
> if (IS_ERR(phy_fwnode)) {
> if (pl->cfg_link_an_mode == MLO_AN_PHY)
> return -ENODEV;
> return 0;
> }
>
> Fixes: fe2cfbc96803 ("net: stmmac: check if MAC needs to attach to a PHY")
> Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@xxxxxxxxx>
Thank you for working on this! Your patch fixes the issue I reported,
Ethernet is back on my X96 Air so this patch is:
Tested-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>

My understanding is that Russell King is asking for a second iteration
of this patch with his feedback incorporated. I'm happy to test this
second version as well if you keep me Cc'ed.
For this second version you can also (unconditionally) add:
Reported-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>


Best regards,
Martin