Skip to contentSkip to conversation

net: enetc: fix link error again

PATCH Applied Arnd Bergmann 3 participants 4 messages Apr 22, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: enetc: fix link error again

From: Arnd Bergmann <[email protected]>

A link time bug that I had fixed before has come back now that another sub-module was added to the enetc driver:

ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!

The problem is that the enetc Makefile is not actually used for the ierb module if that is the only built-in driver in there and everything else is a loadable module.

Fix it by always entering the directory this time, regardless of which symbols are configured. This should reliably fix the problem and prevent it from coming back another time.

Fixes 112463ddbe82 ("net: dsa: felix: fix link error")
Fixes e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
---
 drivers/net/ethernet/freescale/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/freescale/Makefile +1 -3
index 67c436400352..de7b31842233 100644
@@ -24,6 +24,4 @@ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/
 
 obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/
 
-obj-$(CONFIG_FSL_ENETC) += enetc/
-obj-$(CONFIG_FSL_ENETC_MDIO) += enetc/
-obj-$(CONFIG_FSL_ENETC_VF) += enetc/
+obj-y += enetc/
Signature · 1 line
2.29.2
Acked-by on v1 1/1
#1 lore raw
Quoted 37 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

A link time bug that I had fixed before has come back now that another sub-module was added to the enetc driver:

ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!

The problem is that the enetc Makefile is not actually used for the ierb module if that is the only built-in driver in there and everything else is a loadable module.

Fix it by always entering the directory this time, regardless of which symbols are configured. This should reliably fix the problem and prevent it from coming back another time.

Fixes 112463ddbe82 ("net: dsa: felix: fix link error")
Fixes e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
---
 drivers/net/ethernet/freescale/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/freescale/Makefile +1 -3
index 67c436400352..de7b31842233 100644
@@ -24,6 +24,4 @@ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/
 
 obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/
 
-obj-$(CONFIG_FSL_ENETC) += enetc/
-obj-$(CONFIG_FSL_ENETC_MDIO) += enetc/
-obj-$(CONFIG_FSL_ENETC_VF) += enetc/
+obj-y += enetc/
Signature · 1 line
2.29.2

I feel so bad that I'm incapable of troubleshooting even the most elementary Kconfig issues... I did not even once think of opening that Makefile.

#2 lore raw
Quoted 9 lines · Vladimir Oltean
Quoted 3 lines

The problem is that the enetc Makefile is not actually used for the ierb module if that is the only built-in driver in there and everything else is a loadable module.

I feel so bad that I'm incapable of troubleshooting even the most elementary Kconfig issues... I did not even once think of opening that Makefile.

No worries, this is a particularly nasty way Kconfig can go wrong, I thing most kernel developers would struggle with this.

Arnd

#3 lore raw
In reply to Arnd Bergmann
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Thu, 22 Apr 2021 15:35:11 +0200 you wrote:

From: Arnd Bergmann <[email protected]>

A link time bug that I had fixed before has come back now that another sub-module was added to the enetc driver:

ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!

[...]

Here is the summary with links:
- [net-next] net: enetc: fix link error again

    https://git.kernel.org/netdev/net-next/c/74c97ea3b61e

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