public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH
@ 2026-03-12  6:59 Cai Xinchen
  2026-03-12  6:59 ` [PATCH v3 -next 1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH Cai Xinchen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cai Xinchen @ 2026-03-12  6:59 UTC (permalink / raw)
  To: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, caixinchen1

When compile FSL_DPAA2_SWITCH, it needs to set CONFIG_FSL_DPAA2_ETH=y,
otherwise it cannot be compiled.
And as Ioana Ciornei sugggested, FSL_DPAA2_SWITCH included dpaa2-mac.o in
the driver, but it does not select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO.
And FSL_DPAA2_SWITCH depends on FSL_MC_BUS && FSL_MC_DPIO becuase it uses
fsl_mc_driver APIs.

v2->v3
Add depends on FSL_MC_BUS && FSL_MC_DPIO for FSL_DPAA2_SWITCH which also
satisfy FSL_XGMAC_MDIO's OF requirement.

v1->v2
There is no code dependency between the dpaa2-switch driver and the
dpaa2-eth, so use Makefile to control dpaa2-eth instead of using depending
on in Kconfig.
And add select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO for FSL_DPAA2_SWITCH.

Cai Xinchen (2):
  dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
  dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n

 drivers/net/ethernet/freescale/Makefile      | 3 +--
 drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.34.1


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

* [PATCH v3 -next 1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
  2026-03-12  6:59 [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH Cai Xinchen
@ 2026-03-12  6:59 ` Cai Xinchen
  2026-03-12  6:59 ` [PATCH v3 -next 2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n Cai Xinchen
  2026-03-14 20:40 ` [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Cai Xinchen @ 2026-03-12  6:59 UTC (permalink / raw)
  To: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, caixinchen1

Since the commit 84cba72956fd ("dpaa2-switch: integrate
the MAC endpoint support") included dpaa2-mac.o in the driver,
but it didn't select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. it
will lead to link error, such as
undefined reference to `phylink_ethtool_ksettings_set'
undefined reference to `lynx_pcs_create_fwnode'

And the same reason as the commit d2624e70a2f53 ("dpaa2-eth: select
XGMAC_MDIO for MDIO bus support"), enable the FSL_XGMAC_MDIO Kconfig
option in order to have MDIO access to internal and external PHYs.

Because dpaa2-switch uses fsl_mc_driver APIs, add depends on FSL_MC_BUS
&& FSL_MC_DPIO as FSL_DPAA2_SWITCH do.

FSL_XGMAC_MDIO and FSL_MC_BUS depend on OF, thus the dependence of
FSL_MC_BUS can satisfy FSL_XGMAC_MDIO's OF requirement.

Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support")
Suggested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Cai Xinchen <caixinchen1@huawei.com>
---
 drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/freescale/dpaa2/Kconfig b/drivers/net/ethernet/freescale/dpaa2/Kconfig
index d029b69c3f18..36280e5d99e1 100644
--- a/drivers/net/ethernet/freescale/dpaa2/Kconfig
+++ b/drivers/net/ethernet/freescale/dpaa2/Kconfig
@@ -34,6 +34,10 @@ config FSL_DPAA2_SWITCH
 	tristate "Freescale DPAA2 Ethernet Switch"
 	depends on BRIDGE || BRIDGE=n
 	depends on NET_SWITCHDEV
+	depends on FSL_MC_BUS && FSL_MC_DPIO
+	select PHYLINK
+	select PCS_LYNX
+	select FSL_XGMAC_MDIO
 	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

* [PATCH v3 -next 2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
  2026-03-12  6:59 [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH Cai Xinchen
  2026-03-12  6:59 ` [PATCH v3 -next 1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH Cai Xinchen
@ 2026-03-12  6:59 ` Cai Xinchen
  2026-03-14 20:40 ` [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Cai Xinchen @ 2026-03-12  6:59 UTC (permalink / raw)
  To: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, caixinchen1

CONFIG_FSL_DPAA2_ETH and CONFIG_FSL_DPAA2_SWITCH are not
associated, but the compilation of FSL_DPAA2_SWITCH depends on
the compilation of the dpaa2 folder. The files controlled by
CONFIG_FSL_DPAA2_SWITCH in the dpaa2 folder are not controlled
by CONFIG_FSL_DPAA2_ETH, except for the files controlled by
CONFIG_FSL_DPAA2_SWITCH. Therefore, removing the restriction will
not affect the compilation of the files in the directory.

Fixes: f48298d3fbfaa ("staging: dpaa2-switch: move the driver out of staging")
Suggested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Cai Xinchen <caixinchen1@huawei.com>
---
 drivers/net/ethernet/freescale/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile
index de7b31842233..d0a259e47960 100644
--- 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/
-- 
2.34.1


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

* Re: [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH
  2026-03-12  6:59 [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH Cai Xinchen
  2026-03-12  6:59 ` [PATCH v3 -next 1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH Cai Xinchen
  2026-03-12  6:59 ` [PATCH v3 -next 2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n Cai Xinchen
@ 2026-03-14 20:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-14 20:40 UTC (permalink / raw)
  To: Cai Xinchen
  Cc: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 12 Mar 2026 06:59:05 +0000 you wrote:
> When compile FSL_DPAA2_SWITCH, it needs to set CONFIG_FSL_DPAA2_ETH=y,
> otherwise it cannot be compiled.
> And as Ioana Ciornei sugggested, FSL_DPAA2_SWITCH included dpaa2-mac.o in
> the driver, but it does not select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO.
> And FSL_DPAA2_SWITCH depends on FSL_MC_BUS && FSL_MC_DPIO becuase it uses
> fsl_mc_driver APIs.
> 
> [...]

Here is the summary with links:
  - [v3,-next,1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH
    https://git.kernel.org/netdev/net-next/c/12589892f41c
  - [v3,-next,2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n
    https://git.kernel.org/netdev/net-next/c/97daf00745f7

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:[~2026-03-14 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12  6:59 [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH Cai Xinchen
2026-03-12  6:59 ` [PATCH v3 -next 1/2] dpaa2: add independent dependencies for FSL_DPAA2_SWITCH Cai Xinchen
2026-03-12  6:59 ` [PATCH v3 -next 2/2] dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n Cai Xinchen
2026-03-14 20:40 ` [PATCH v3 -next 0/2] dpaa2: fix config relation with FSL_DPAA2_SWITCH 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