Skip to contentSkip to conversation

net: dsa: Fix dependencies with HSR

PATCH Applied Florian Fainelli 4 participants 5 messages Feb 20, 2021 – Feb 23, 2021

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

PATCH 1/1 net: dsa: Fix dependencies with HSR

The core DSA framework uses hsr_is_master() which would not resolve to a valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes 18596f504a3e ("net: dsa: add support for offloading HSR")

---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree soon as well when your pull request gets sent out.

 net/dsa/Kconfig | 1 +
 1 file changed, 1 insertion(+)
net/dsa/Kconfig +1 -0
index a45572cfb71a..3589224c8da9 100644
@@ -9,6 +9,7 @@ menuconfig NET_DSA
 	tristate "Distributed Switch Architecture"
 	depends on HAVE_NET_DSA
 	depends on BRIDGE || BRIDGE=n
+	depends on HSR || HSR=n
 	select GRO_CELLS
 	select NET_SWITCHDEV
 	select PHYLINK
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Florian Fainelli

The core DSA framework uses hsr_is_master() which would not resolve to a valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes 18596f504a3e ("net: dsa: add support for offloading HSR")

---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree soon as well when your pull request gets sent out.

I had initially considered making is_hsr_master() a static inline that would compare dev->dev.type->name with "hsr" since the HSR master would set a custom dev_type, however the xrs700x driver would still fail to link because it calls hsr_get_version() and for that one there is no easy solution.

Signature · 1 line
Florian
Reviewed-by
#2 lore raw
Quoted 13 lines · Florian Fainelli
Quoted 9 lines · Florian Fainelli

The core DSA framework uses hsr_is_master() which would not resolve to a valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes 18596f504a3e ("net: dsa: add support for offloading HSR")

---
David, Jakub,

Quoted 8 lines
Quoted 2 lines

This showed up in linux-next which means it will show up in Linus' tree soon as well when your pull request gets sent out.

I had initially considered making is_hsr_master() a static inline that would compare dev->dev.type->name with "hsr" since the HSR master would set a custom dev_type, however the xrs700x driver would still fail to link because it calls hsr_get_version() and for that one there is no easy solution.

Thanks for looking into this. It's not something I've run into before. It didn't occur to me what would happen if HSR was a module. I'll look out for this in the future.

Sorry for the inconvenience.

-George

Quoted 2 lines

--
Florian

maintainer Reviewed-by Tested-by on v1 1/1
#3 lore raw
In reply to Florian Fainelli
Quoted 7 lines · Florian Fainelli

The core DSA framework uses hsr_is_master() which would not resolve to a valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes 18596f504a3e ("net: dsa: add support for offloading HSR")

---

#4 lore raw
In reply to Florian Fainelli
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

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

Quoted 8 lines · On Fri, 19 Feb 2021 21:12:21 -0800 you wrote:

The core DSA framework uses hsr_is_master() which would not resolve to a valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes 18596f504a3e ("net: dsa: add support for offloading HSR")

[...]

Here is the summary with links:
- [net-next] net: dsa: Fix dependencies with HSR

    https://git.kernel.org/netdev/net/c/94ead4caa061

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