Skip to contentSkip to conversation

net: ti: icssg-prueth: Add optional dependency on HSR

PATCH Superseded Kevin Hao 1 participant 2 messages Feb 6

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

PATCH v2 1/1 net: ti: icssg-prueth: Add optional dependency on HSR

Commit 95540ad6747c ("net: ti: icssg-prueth: Add support for HSR frame forward offload") introduced support for offloading HSR frame forwarding, which relies on functions such as is_hsr_master() provided by the HSR module. Although HSR provides stubs for configurations with HSR disabled, this driver still requires an optional dependency on HSR. Otherwise, build failures will occur when icssg-prueth is built-in while HSR is configured as a module.
ld.lld: error: undefined symbol: is_hsr_master

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

referenced by icssg_prueth.c:710 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:710)
drivers/net/ethernet/ti/icssg/icssg_prueth.o:(icssg_prueth_hsr_del_mcast) in archive vmlinux.a
referenced by icssg_prueth.c:681 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:681)
drivers/net/ethernet/ti/icssg/icssg_prueth.o:(icssg_prueth_hsr_add_mcast) in archive vmlinux.a
referenced by icssg_prueth.c:1812 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:1812)
drivers/net/ethernet/ti/icssg/icssg_prueth.o:(prueth_netdevice_event) in archive vmlinux.a

ld.lld: error: undefined symbol: hsr_get_port_ndev

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

referenced by icssg_prueth.c:712 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:712)
drivers/net/ethernet/ti/icssg/icssg_prueth.o:(icssg_prueth_hsr_del_mcast) in archive vmlinux.a
referenced by icssg_prueth.c:712 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:712)
drivers/net/etherneteth_hsr_del_mcast) in archive vmlinux.a
referenced by icssg_prueth.c:683 (drivers/net/ethernet/ti/icssg/icssg_prueth.c:683)
drivers/net/ethernet/ti/icssg/icssg_prueth.o:(icssg_prueth_hsr_add_mcast) in archive vmlinux.a
referenced 1 more times

Fixes 95540ad6747c ("net: ti: icssg-prueth: Add support for HSR frame forward offload")

---
Cc: Andrew Lunn <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Roger Quadros <[email protected]>
Cc: Mohan Reddy Putluru <[email protected]>
Cc: MD Danish Anwar <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Sascha Hauer <[email protected]>
---
Changes in v2:
- Switch to the optional dependency as recommended by Jakub.

- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/net/ethernet/ti/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/ti/Kconfig +1 -0
index fe5b2926d8ab060d83f5a58d91e749a45c6cea18..ade43c921c71daca930df5e890ca00b3ccf600c4 100644
@@ -192,6 +192,7 @@ config TI_ICSSG_PRUETH
 	depends on NET_SWITCHDEV
 	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
 	depends on PTP_1588_CLOCK_OPTIONAL
+	depends on HSR if HSR
 	help
 	  Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.
 	  This subsystem is available starting with the AM65 platform.

---
base-commit: 9845cf73f7db6094c0d8419d6adb848028f4a921
change-id: 20260203-icssg-dep-b9f7fc2be11e

Best regards,

Signature · 1 line
Kevin Hao <[email protected]>
author
#1 lore raw

drivers/net/ethernet/ti/Kconfig config TI_ICSSG_PRUETH · line 195

Quoted 9 lines · Kevin Hao
drivers/net/ethernet/ti/Kconfig +1 -0
index fe5b2926d8ab060d83f5a58d91e749a45c6cea18..ade43c921c71daca930df5e890ca00b3ccf600c4 100644
@@ -192,6 +192,7 @@ config TI_ICSSG_PRUETH
 	depends on NET_SWITCHDEV
 	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
 	depends on PTP_1588_CLOCK_OPTIONAL
+	depends on HSR if HSR

It appears that support for this syntax [1] has not yet been merged into the net tree. I will change it to depends on HSR || !HSR and retest on the pure net tree. Apologies for the noise.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=76df6815dab76d7890936dc5f6d91cf7e7f88358

Thanks,
Kevin