public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fec: make FIXED_PHY dependency unconditional
@ 2026-04-02 14:10 Arnd Bergmann
  2026-04-03 16:02 ` Simon Horman
  2026-04-03 22:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-04-02 14:10 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heiner Kallweit
  Cc: Arnd Bergmann, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When CONFIG_FIXED_PHY is in a loadable module, the fec driver cannot be
built-in any more:

x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe':
fec_main.c:(.text+0xc4f367): undefined reference to `fixed_phy_unregister'
x86_64-linux-ld: vmlinux.o: in function `fec_enet_close':
fec_main.c:(.text+0xc59591): undefined reference to `fixed_phy_unregister'
x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe.cold':

Select the fixed phy support on all targets to make this build
correctly, not just on coldfire.

Notat that Essentially the stub helpers in include/linux/phy_fixed.h
cannot be used correctly because of this build time dependency,
and we could just remove them to hit the build failure more often
when a driver uses them without the 'select FIXED_PHY'.

Fixes: dc86b621e1b4 ("net: fec: register a fixed phy using fixed_phy_register_100fd if needed")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I sent the same fix for B44 earlier, see commit 3f0f591b44b0 ("net: b44:
always select CONFIG_FIXED_PHY"). I checked that there are no other
conditional users of FIXED_PHY this time.
---
 drivers/net/ethernet/freescale/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig
index e2a591cf9601..11edbb46a118 100644
--- a/drivers/net/ethernet/freescale/Kconfig
+++ b/drivers/net/ethernet/freescale/Kconfig
@@ -28,7 +28,7 @@ config FEC
 	depends on PTP_1588_CLOCK_OPTIONAL
 	select CRC32
 	select PHYLIB
-	select FIXED_PHY if M5272
+	select FIXED_PHY
 	select PAGE_POOL
 	imply PAGE_POOL_STATS
 	imply NET_SELFTESTS
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: fec: make FIXED_PHY dependency unconditional
  2026-04-02 14:10 [PATCH] net: fec: make FIXED_PHY dependency unconditional Arnd Bergmann
@ 2026-04-03 16:02 ` Simon Horman
  2026-04-03 22:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-04-03 16:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heiner Kallweit, Arnd Bergmann, netdev, linux-kernel

On Thu, Apr 02, 2026 at 04:10:40PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_FIXED_PHY is in a loadable module, the fec driver cannot be
> built-in any more:
> 
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe':
> fec_main.c:(.text+0xc4f367): undefined reference to `fixed_phy_unregister'
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_close':
> fec_main.c:(.text+0xc59591): undefined reference to `fixed_phy_unregister'
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe.cold':
> 
> Select the fixed phy support on all targets to make this build
> correctly, not just on coldfire.
> 
> Notat that Essentially the stub helpers in include/linux/phy_fixed.h
> cannot be used correctly because of this build time dependency,
> and we could just remove them to hit the build failure more often
> when a driver uses them without the 'select FIXED_PHY'.
> 
> Fixes: dc86b621e1b4 ("net: fec: register a fixed phy using fixed_phy_register_100fd if needed")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I sent the same fix for B44 earlier, see commit 3f0f591b44b0 ("net: b44:
> always select CONFIG_FIXED_PHY"). I checked that there are no other
> conditional users of FIXED_PHY this time.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: fec: make FIXED_PHY dependency unconditional
  2026-04-02 14:10 [PATCH] net: fec: make FIXED_PHY dependency unconditional Arnd Bergmann
  2026-04-03 16:02 ` Simon Horman
@ 2026-04-03 22:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-03 22:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, hkallweit1, arnd,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  2 Apr 2026 16:10:40 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_FIXED_PHY is in a loadable module, the fec driver cannot be
> built-in any more:
> 
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe':
> fec_main.c:(.text+0xc4f367): undefined reference to `fixed_phy_unregister'
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_close':
> fec_main.c:(.text+0xc59591): undefined reference to `fixed_phy_unregister'
> x86_64-linux-ld: vmlinux.o: in function `fec_enet_mii_probe.cold':
> 
> [...]

Here is the summary with links:
  - net: fec: make FIXED_PHY dependency unconditional
    https://git.kernel.org/netdev/net/c/e16a0d36777b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-03 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 14:10 [PATCH] net: fec: make FIXED_PHY dependency unconditional Arnd Bergmann
2026-04-03 16:02 ` Simon Horman
2026-04-03 22:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox