Re: [PATCHv2 net-next 2/2] net: thunder_bgx: use OF loop instead of fwnode

From: Andrew Lunn
Date: Mon Sep 08 2025 - 12:31:55 EST


On Thu, Sep 04, 2025 at 02:32:28PM -0700, Rosen Penev wrote:
> This is implemented under CONFIG_OF_MDIO, which already assumes an OF
> node.

I'm not sure that is correct.

bgx_probe() -> bgx_init_phy() -> bgx_init_of_phy()

static int bgx_init_phy(struct bgx *bgx)
{
if (!acpi_disabled)
return bgx_init_acpi_phy(bgx);

return bgx_init_of_phy(bgx);
}

There is no check made to see if this is an ACPI node and so
bgx_init_acpi_phy() is called. So it might be an ACPI node is passed
to bgx_init_of_phy().

How have you tested this code? On an ACPI machine, or only a DT
machine?

Andrew