public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
@ 2026-03-03  1:38 Cai Xinchen
  2026-03-04  2:21 ` Jakub Kicinski
  2026-03-04 10:23 ` Ioana Ciornei
  0 siblings, 2 replies; 4+ messages in thread
From: Cai Xinchen @ 2026-03-03  1:38 UTC (permalink / raw)
  To: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, caixinchen1

When CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add
depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig

Signed-off-by: Cai Xinchen <caixinchen1@huawei.com>
---
 drivers/net/ethernet/freescale/dpaa2/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/dpaa2/Kconfig b/drivers/net/ethernet/freescale/dpaa2/Kconfig
index d029b69c3f18..b303af155a86 100644
--- a/drivers/net/ethernet/freescale/dpaa2/Kconfig
+++ b/drivers/net/ethernet/freescale/dpaa2/Kconfig
@@ -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.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
  2026-03-03  1:38 [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH Cai Xinchen
@ 2026-03-04  2:21 ` Jakub Kicinski
  2026-03-04 10:23 ` Ioana Ciornei
  1 sibling, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2026-03-04  2:21 UTC (permalink / raw)
  To: Cai Xinchen
  Cc: ioana.ciornei, andrew+netdev, davem, edumazet, pabeni, netdev,
	linux-kernel

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 on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig

Please add a relevant Fixes tag
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
  2026-03-03  1:38 [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH Cai Xinchen
  2026-03-04  2:21 ` Jakub Kicinski
@ 2026-03-04 10:23 ` Ioana Ciornei
  2026-03-09 11:18   ` Cai Xinchen
  1 sibling, 1 reply; 4+ messages in thread
From: Ioana Ciornei @ 2026-03-04 10:23 UTC (permalink / raw)
  To: Cai Xinchen
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

On Tue, Mar 03, 2026 at 01:38:14AM +0000, Cai Xinchen wrote:
> When CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add
> depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig

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:

--- a/drivers/net/ethernet/freescale/Makefile
+++ b/drivers/net/ethernet/freescale/Makefile
@@ -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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH
  2026-03-04 10:23 ` Ioana Ciornei
@ 2026-03-09 11:18   ` Cai Xinchen
  0 siblings, 0 replies; 4+ messages in thread
From: Cai Xinchen @ 2026-03-09 11:18 UTC (permalink / raw)
  To: Ioana Ciornei
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Yes, it is better solution. I will send v2. Thank you.

On 3/4/2026 6:23 PM, Ioana Ciornei wrote:
> On Tue, Mar 03, 2026 at 01:38:14AM +0000, Cai Xinchen wrote:
>> When CONFIG_FSL_DPAA2_ETH=n, dpaa2 cannot be compiled. Thus Add
>> depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH in Kconfig
> 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:
>
> --- a/drivers/net/ethernet/freescale/Makefile
> +++ b/drivers/net/ethernet/freescale/Makefile
> @@ -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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-09 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03  1:38 [PATCH -next] dpaa2-switch: Add depend on FSL_DPAA2_ETH to FSL_DPAA2_SWITCH Cai Xinchen
2026-03-04  2:21 ` Jakub Kicinski
2026-03-04 10:23 ` Ioana Ciornei
2026-03-09 11:18   ` Cai Xinchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox