[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <243fa8a5-4872-40b3-9859-af475b4d6ad5@intel.com>
Date: Wed, 30 Apr 2025 13:43:32 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Heiner Kallweit <hkallweit1@...il.com>, Andrew Lunn <andrew@...n.ch>,
Russell King - ARM Linux <linux@...linux.org.uk>, Paolo Abeni
<pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>, David Miller
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: factor out provider part from
mdio_bus.c
On 4/28/2025 1:53 PM, Heiner Kallweit wrote:
> After 52358dd63e34 ("net: phy: remove function stubs") there's a
> problem if CONFIG_MDIO_BUS is set, but CONFIG_PHYLIB is not.
> mdiobus_scan() uses phylib functions like get_phy_device().
> Bringing back the stub wouldn't make much sense, because it would
> allow to compile mdiobus_scan(), but the function would be unusable.
> The stub returned NULL, and we have the following in mdiobus_scan():
>
> phydev = get_phy_device(bus, addr, c45);
> if (IS_ERR(phydev))
> return phydev;
>
> So calling mdiobus_scan() w/o CONFIG_PHYLIB would cause a crash later in
> mdiobus_scan(). In general the PHYLIB functionality isn't optional here.
> Consequently, MDIO bus providers depend on PHYLIB.
> Therefore factor it out and build it together with the libphy core
> modules. In addition make all MDIO bus providers under /drivers/net/mdio
> depend on PHYLIB. Same applies to enetc MDIO bus provider. Note that
> PHYLIB selects MDIO_DEVRES, therefore we can omit the dependency here.
>
> Fixes: 52358dd63e34 ("net: phy: remove function stubs")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504270639.mT0lh2o1-lkp@intel.com/
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
I checked this with git show --color-moved, and indeed the bus provider
code is unaltered.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Powered by blists - more mailing lists