* [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
@ 2024-05-16 16:56 Florian Fainelli
2024-05-17 15:17 ` Vladimir Oltean
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Florian Fainelli @ 2024-05-16 16:56 UTC (permalink / raw)
To: netdev
Cc: stephenlangstaff1, aleksander.lobakin, Florian Fainelli,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Vladimir Oltean, Florian Fainelli, Alexander Lobakin, open list
Stephen reported that he was unable to get the dsa_loop driver to get
probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y
in his kernel configuration. As Masahiro explained it:
"obj-m += dsa/" means everything under dsa/ must be modular.
If there is a built-in object under dsa/ with CONFIG_NET_DSA=m,
you cannot do "obj-$(CONFIG_NET_DSA) += dsa/".
You need to change it back to "obj-y += dsa/".
This was the case here whereby CONFIG_NET_DSA=m, and so the
obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o rule is not executed and
the DSA loop mdio_board info structure is not registered with the
kernel, and eventually the device is simply not found.
To preserve the intention of the original commit of limiting the amount
of folder descending, conditionally descend into drivers/net/dsa when
CONFIG_NET_DSA is enabled.
Fixes: 227d72063fcc ("dsa: simplify Kconfig symbols and dependencies")
Reported-by: Stephen Langstaff <stephenlangstaff1@gmail.com>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
Changes in v2:
- conditionally descend into the dsa folder based upon CONFIG_NET_DSA
- change subject a bit to reflect the change
drivers/net/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 9c053673d6b2..13743d0e83b5 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -49,7 +49,9 @@ obj-$(CONFIG_MHI_NET) += mhi_net.o
obj-$(CONFIG_ARCNET) += arcnet/
obj-$(CONFIG_CAIF) += caif/
obj-$(CONFIG_CAN) += can/
-obj-$(CONFIG_NET_DSA) += dsa/
+ifdef CONFIG_NET_DSA
+obj-y += dsa/
+endif
obj-$(CONFIG_ETHERNET) += ethernet/
obj-$(CONFIG_FDDI) += fddi/
obj-$(CONFIG_HIPPI) += hippi/
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
2024-05-16 16:56 [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled Florian Fainelli
@ 2024-05-17 15:17 ` Vladimir Oltean
2024-05-17 15:17 ` Alexander Lobakin
2024-05-20 10:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2024-05-17 15:17 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, stephenlangstaff1, aleksander.lobakin, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Florian Fainelli,
Alexander Lobakin, open list
On Thu, May 16, 2024 at 09:56:30AM -0700, Florian Fainelli wrote:
> Stephen reported that he was unable to get the dsa_loop driver to get
> probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y
> in his kernel configuration. As Masahiro explained it:
>
> "obj-m += dsa/" means everything under dsa/ must be modular.
>
> If there is a built-in object under dsa/ with CONFIG_NET_DSA=m,
> you cannot do "obj-$(CONFIG_NET_DSA) += dsa/".
>
> You need to change it back to "obj-y += dsa/".
>
> This was the case here whereby CONFIG_NET_DSA=m, and so the
> obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o rule is not executed and
> the DSA loop mdio_board info structure is not registered with the
> kernel, and eventually the device is simply not found.
>
> To preserve the intention of the original commit of limiting the amount
> of folder descending, conditionally descend into drivers/net/dsa when
> CONFIG_NET_DSA is enabled.
>
> Fixes: 227d72063fcc ("dsa: simplify Kconfig symbols and dependencies")
> Reported-by: Stephen Langstaff <stephenlangstaff1@gmail.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
2024-05-16 16:56 [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled Florian Fainelli
2024-05-17 15:17 ` Vladimir Oltean
@ 2024-05-17 15:17 ` Alexander Lobakin
2024-05-20 10:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Alexander Lobakin @ 2024-05-17 15:17 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, stephenlangstaff1, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Vladimir Oltean, Florian Fainelli,
Alexander Lobakin, open list
From: Florian Fainelli <florian.fainelli@broadcom.com>
Date: Thu, 16 May 2024 09:56:30 -0700
> Stephen reported that he was unable to get the dsa_loop driver to get
> probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y
> in his kernel configuration. As Masahiro explained it:
>
> "obj-m += dsa/" means everything under dsa/ must be modular.
>
> If there is a built-in object under dsa/ with CONFIG_NET_DSA=m,
> you cannot do "obj-$(CONFIG_NET_DSA) += dsa/".
>
> You need to change it back to "obj-y += dsa/".
>
> This was the case here whereby CONFIG_NET_DSA=m, and so the
> obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o rule is not executed and
> the DSA loop mdio_board info structure is not registered with the
> kernel, and eventually the device is simply not found.
>
> To preserve the intention of the original commit of limiting the amount
> of folder descending, conditionally descend into drivers/net/dsa when
> CONFIG_NET_DSA is enabled.
>
> Fixes: 227d72063fcc ("dsa: simplify Kconfig symbols and dependencies")
> Reported-by: Stephen Langstaff <stephenlangstaff1@gmail.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
> Changes in v2:
>
> - conditionally descend into the dsa folder based upon CONFIG_NET_DSA
> - change subject a bit to reflect the change
>
> drivers/net/Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 9c053673d6b2..13743d0e83b5 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -49,7 +49,9 @@ obj-$(CONFIG_MHI_NET) += mhi_net.o
> obj-$(CONFIG_ARCNET) += arcnet/
> obj-$(CONFIG_CAIF) += caif/
> obj-$(CONFIG_CAN) += can/
> -obj-$(CONFIG_NET_DSA) += dsa/
> +ifdef CONFIG_NET_DSA
> +obj-y += dsa/
> +endif
> obj-$(CONFIG_ETHERNET) += ethernet/
> obj-$(CONFIG_FDDI) += fddi/
> obj-$(CONFIG_HIPPI) += hippi/
Thanks,
Olek
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
2024-05-16 16:56 [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled Florian Fainelli
2024-05-17 15:17 ` Vladimir Oltean
2024-05-17 15:17 ` Alexander Lobakin
@ 2024-05-20 10:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-20 10:10 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, stephenlangstaff1, aleksander.lobakin, davem, edumazet,
kuba, pabeni, olteanv, f.fainelli, alobakin, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Thu, 16 May 2024 09:56:30 -0700 you wrote:
> Stephen reported that he was unable to get the dsa_loop driver to get
> probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y
> in his kernel configuration. As Masahiro explained it:
>
> "obj-m += dsa/" means everything under dsa/ must be modular.
>
> If there is a built-in object under dsa/ with CONFIG_NET_DSA=m,
> you cannot do "obj-$(CONFIG_NET_DSA) += dsa/".
>
> [...]
Here is the summary with links:
- [net,v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
https://git.kernel.org/netdev/net/c/b1fa60ec252f
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] 4+ messages in thread
end of thread, other threads:[~2024-05-20 10:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 16:56 [PATCH net v2] net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled Florian Fainelli
2024-05-17 15:17 ` Vladimir Oltean
2024-05-17 15:17 ` Alexander Lobakin
2024-05-20 10:10 ` 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