Skip to contentSkip to conversation

net: ethernet: ti: cpsw_switchdev: fix unmet direct dependencies detected for NET_SWITCHDEV

PATCH Applied Grygorii Strashko 4 participants 8 messages Dec 4, 2019 – Dec 6, 2019

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

cover net: ethernet: ti: cpsw_switchdev: fix unmet direct dependencies detected for NET_SWITCHDEV

This series fixes Kconfig warning with CONFIG_COMPILE_TEST=y reported by Randy Dunlap <[email protected]> [1]

[1] https://lkml.org/lkml/2019/12/3/1373

Grygorii Strashko (2):
net: ethernet: ti: cpsw_switchdev: fix unmet direct dependencies
detected for NET_SWITCHDEV
arm: omap2plus_defconfig: enable NET_SWITCHDEV

 arch/arm/configs/omap2plus_defconfig | 3 ++-
 drivers/net/ethernet/ti/Kconfig      | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 net: ethernet: ti: cpsw_switchdev: fix unmet direct dependencies detected for NET_SWITCHDEV

Replace "select NET_SWITCHDEV" vs "depends on NET_SWITCHDEV" to fix Kconfig warning with CONFIG_COMPILE_TEST=y

WARNING: unmet direct dependencies detected for NET_SWITCHDEV
Depends on [n]: NET [=y] && INET [=n]
Selected by [y]:
- TI_CPSW_SWITCHDEV [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && (ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST [=y])

because TI_CPSW_SWITCHDEV blindly selects NET_SWITCHDEV even though INET is not set/enabled, while NET_SWITCHDEV depends on INET.

Fixes ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
---
 drivers/net/ethernet/ti/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/Kconfig +1 -1
index 9170572346b5..a46f4189fde3 100644
@@ -62,7 +62,7 @@ config TI_CPSW
 config TI_CPSW_SWITCHDEV
 	tristate "TI CPSW Switch Support with switchdev"
 	depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
-	select NET_SWITCHDEV
+	depends on NET_SWITCHDEV
 	select TI_DAVINCI_MDIO
 	select MFD_SYSCON
 	select REGMAP
Signature · 1 line
2.17.1
Acked-by on v1 1/2
#2 lore raw
Quoted 8 lines · Grygorii Strashko

Replace "select NET_SWITCHDEV" vs "depends on NET_SWITCHDEV" to fix Kconfig warning with CONFIG_COMPILE_TEST=y

WARNING: unmet direct dependencies detected for NET_SWITCHDEV
Depends on [n]: NET [=y] && INET [=n]
Selected by [y]:
- TI_CPSW_SWITCHDEV [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && (ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST [=y])

Quoted 6 lines

because TI_CPSW_SWITCHDEV blindly selects NET_SWITCHDEV even though INET is not set/enabled, while NET_SWITCHDEV depends on INET.

Fixes ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")

Thanks.

Quoted 18 lines
---
 drivers/net/ethernet/ti/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/Kconfig +1 -1
index 9170572346b5..a46f4189fde3 100644
@@ -62,7 +62,7 @@ config TI_CPSW
 config TI_CPSW_SWITCHDEV
 	tristate "TI CPSW Switch Support with switchdev"
 	depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
-	select NET_SWITCHDEV
+	depends on NET_SWITCHDEV
 	select TI_DAVINCI_MDIO
 	select MFD_SYSCON
 	select REGMAP
Signature · 1 line
~Randy
#3 lore raw

PATCH 2/2 arm: omap2plus_defconfig: enable NET_SWITCHDEV

In reply to Grygorii Strashko

The TI_CPSW_SWITCHDEV definition in Kconfig was changed from "select NET_SWITCHDEV" to "depends on NET_SWITCHDEV", and therefore it is required to explicitelly enable NET_SWITCHDEV config option in omap2plus_defconfig.

Fixes 3727d259ddaf ("arm: omap2plus_defconfig: enable new cpsw switchdev driver")
---
 arch/arm/configs/omap2plus_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/omap2plus_defconfig +2 -1
index 89cce8d4bc6b..7bbef86a4e76 100644
@@ -92,6 +92,7 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 CONFIG_NETFILTER=y
 CONFIG_PHONET=m
+CONFIG_NET_SWITCHDEV=y
 CONFIG_CAN=m
 CONFIG_CAN_C_CAN=m
 CONFIG_CAN_C_CAN_PLATFORM=m
@@ -182,6 +183,7 @@ CONFIG_SMSC911X=y
 # CONFIG_NET_VENDOR_STMICRO is not set
 CONFIG_TI_DAVINCI_EMAC=y
 CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
 CONFIG_TI_CPTS=y
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
@@ -554,4 +556,3 @@ CONFIG_DEBUG_INFO_DWARF4=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_SCHEDSTATS=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_TI_CPSW_SWITCHDEV=y
Signature · 1 line
2.17.1
#4 lore raw

Re: [PATCH 2/2] arm: omap2plus_defconfig: enable NET_SWITCHDEV

Hi Tony,

Quoted 32 lines · Grygorii Strashko

The TI_CPSW_SWITCHDEV definition in Kconfig was changed from "select NET_SWITCHDEV" to "depends on NET_SWITCHDEV", and therefore it is required to explicitelly enable NET_SWITCHDEV config option in omap2plus_defconfig.

Fixes 3727d259ddaf ("arm: omap2plus_defconfig: enable new cpsw switchdev driver")
---
  arch/arm/configs/omap2plus_defconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/omap2plus_defconfig +2 -0
index 89cce8d4bc6b..7bbef86a4e76 100644
@@ -92,6 +92,7 @@ CONFIG_IP_PNP_BOOTP=y
  CONFIG_IP_PNP_RARP=y
  CONFIG_NETFILTER=y
  CONFIG_PHONET=m
+CONFIG_NET_SWITCHDEV=y
  CONFIG_CAN=m
  CONFIG_CAN_C_CAN=m
  CONFIG_CAN_C_CAN_PLATFORM=m
@@ -182,6 +183,7 @@ CONFIG_SMSC911X=y
  # CONFIG_NET_VENDOR_STMICRO is not set
  CONFIG_TI_DAVINCI_EMAC=y
  CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
  CONFIG_TI_CPTS=y
  # CONFIG_NET_VENDOR_VIA is not set
  # CONFIG_NET_VENDOR_WIZNET is not set

arch/arm/configs/omap2plus_defconfig CONFIG_DEBUG_INFO_DWARF4=y · line 557

Quoted 4 lines
arch/arm/configs/omap2plus_defconfig +0 -1
@@ -554,4 +556,3 @@ CONFIG_DEBUG_INFO_DWARF4=y
  CONFIG_MAGIC_SYSRQ=y
  CONFIG_SCHEDSTATS=y
  # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_TI_CPSW_SWITCHDEV=y

Could it be applied as fix, as without it cpsw switch driver will not be built, so no networking on am571x-idk

Signature · 2 lines
Best regards,
grygorii
maintainer
#5 lore raw

Re: [PATCH 2/2] arm: omap2plus_defconfig: enable NET_SWITCHDEV

Quoted 34 lines · Grygorii Strashko

Hi Tony,

Quoted 31 lines · Grygorii Strashko

The TI_CPSW_SWITCHDEV definition in Kconfig was changed from "select NET_SWITCHDEV" to "depends on NET_SWITCHDEV", and therefore it is required to explicitelly enable NET_SWITCHDEV config option in omap2plus_defconfig.

Fixes 3727d259ddaf ("arm: omap2plus_defconfig: enable new cpsw switchdev driver")
---
  arch/arm/configs/omap2plus_defconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/omap2plus_defconfig +2 -0
index 89cce8d4bc6b..7bbef86a4e76 100644
@@ -92,6 +92,7 @@ CONFIG_IP_PNP_BOOTP=y
  CONFIG_IP_PNP_RARP=y
  CONFIG_NETFILTER=y
  CONFIG_PHONET=m
+CONFIG_NET_SWITCHDEV=y
  CONFIG_CAN=m
  CONFIG_CAN_C_CAN=m
  CONFIG_CAN_C_CAN_PLATFORM=m
@@ -182,6 +183,7 @@ CONFIG_SMSC911X=y
  # CONFIG_NET_VENDOR_STMICRO is not set
  CONFIG_TI_DAVINCI_EMAC=y
  CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
  CONFIG_TI_CPTS=y
  # CONFIG_NET_VENDOR_VIA is not set
  # CONFIG_NET_VENDOR_WIZNET is not set
@@ -554,4 +556,3 @@ CONFIG_DEBUG_INFO_DWARF4=y
Quoted 8 lines

arch/arm/configs/omap2plus_defconfig CONFIG_DEBUG_INFO_DWARF4=y · line 557

Quoted 5 lines
arch/arm/configs/omap2plus_defconfig +0 -1
  CONFIG_MAGIC_SYSRQ=y
  CONFIG_SCHEDSTATS=y
  # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_TI_CPSW_SWITCHDEV=y

Could it be applied as fix, as without it cpsw switch driver will not be built, so no networking on am571x-idk

OK I'll be applying it into fixes.

Thanks,

Tony

#7 lore raw
Quoted 10 lines · David Miller

From: Grygorii Strashko <[email protected]>
Date: Wed, 4 Dec 2019 19:45:31 +0200

Quoted 4 lines

This series fixes Kconfig warning with CONFIG_COMPILE_TEST=y reported by Randy Dunlap <[email protected]> [1]

[1] https://lkml.org/lkml/2019/12/3/1373

I applied patch #1 to the networking tree, the defconfig update has to be routed via the appropriate architecture tree.

Thank you.

Signature · 2 lines
Best regards,
grygorii