dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
Subsystems (3)
PATCH 1/1 dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
When CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig
--- drivers/net/ethernet/freescale/dpaa2/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/freescale/dpaa2/Kconfig +1 -0
@@ -34,6 +34,7 @@ config FSL_DPAA2_SWITCH tristate "Freescale DPAA2 Ethernet Switch" depends on BRIDGE || BRIDGE=n depends on NET_SWITCHDEV + depends on FSL_DPAA2_ETH help Driver for Freescale DPAA2 Ethernet Switch. This driver manages switch objects discovered on the Freeescale MC bus.
Signature · 1 line
2.34.1
Jakub Kicinski
maintainerQuoted 2 lines · On Tue, 3 Mar 2026 01:38:14 +0000 Cai Xinchen wrote:
When
CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add depend onFSL_DPAA2_ETHtoFSL_DPAA2_SWITCHinKconfig
Please add a relevant Fixes tag
Signature · 1 line
pw-bot: cr
Ioana Ciornei
maintainerQuoted 2 lines · Cai Xinchen
When
CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add depend onFSL_DPAA2_ETHtoFSL_DPAA2_SWITCHinKconfig
There is no code dependency between the dpaa2-switch driver and the dpaa2-eth one, just a compile time one dictated by how freescale/Makefile includes the dpaa2/ folder.
How about we always include the folder and let dpaa2/Makefile handle what objects to include depending on the individual Kconfig options? Something like the diff below:
drivers/net/ethernet/freescale/Makefile +1 -2
@@ -22,6 +22,5 @@ ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o obj-$(CONFIG_FSL_FMAN) += fman/ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ -obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ - +obj-y += dpaa2/ obj-y += enetc/
And I just realised that commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver switch objects but didn't amend the Kconfig to specify that PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO should be selected. Could you please also fix that as a separate patch? Otherwise, I can take care of it.
Thanks!
Yes, it is better solution. I will send v2. Thank you.
Quoted 29 lines · Ioana Ciornei
Quoted 2 lines · Cai Xinchen
When
CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add depend onFSL_DPAA2_ETHtoFSL_DPAA2_SWITCHinKconfigThere is no code dependency between the dpaa2-switch driver and the dpaa2-eth one, just a compile time one dictated by how freescale/Makefile includes the dpaa2/ folder.
How about we always include the folder and let dpaa2/Makefile handle what objects to include depending on the individual
Kconfigoptions? Something like the diff below:drivers/net/ethernet/freescale/Makefile +1
-2@@ -22,6 +22,5 @@ ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o obj-$(CONFIG_FSL_FMAN) += fman/ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ -obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ - +obj-y += dpaa2/ obj-y += enetc/And I just realised that commit
84cba72956fd("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver switch objects but didn't amend theKconfigto specify thatPCS_LYNX, PHYLINK andFSL_XGMAC_MDIOshould be selected. Could you please also fix that as a separate patch? Otherwise, I can take care of it.Thanks!