Re: [PATCH] switchdev: add Kconfig dependencies for bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 02, 2021 at 10:44:04PM +0200, Arnd Bergmann wrote:
> > or to extend the BRIDGE || BRIDGE=n dependency to TI_K3_AM65_CPSW_NUSS
> > which is the direct tristate dependency of CONFIG_TI_K3_AM65_CPSW_SWITCHDEV,
> 
> That would work, but it's slightly more heavy-handed than my proposal, as this
> prevents TI_K3_AM65_CPSW_NUSS from being built-in when BRIDGE is a module,
> even when switchdev support is completely disabled.
> 
> > and to make CONFIG_TI_K3_AM65_CPSW_SWITCHDEV simply depend on BRIDGE.
> 
> This would not be needed then I think.

I've tested this change according to your suggestion:

diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 7ac8e5ecbe97..a9980cfc504b 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -93,6 +93,7 @@ config TI_CPTS
 config TI_K3_AM65_CPSW_NUSS
 	tristate "TI K3 AM654x/J721E CPSW Ethernet driver"
 	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
+	depends on (BRIDGE && NET_SWITCHDEV) || BRIDGE=n || NET_SWITCHDEV=n
 	select NET_DEVLINK
 	select TI_DAVINCI_MDIO
 	imply PHY_TI_GMII_SEL
(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
@@ -110,7 +111,6 @@ config TI_K3_AM65_CPSW_NUSS
 config TI_K3_AM65_CPSW_SWITCHDEV
 	bool "TI K3 AM654x/J721E CPSW Switch mode support"
 	depends on TI_K3_AM65_CPSW_NUSS
-	depends on BRIDGE || BRIDGE=n
 	depends on NET_SWITCHDEV
 	help
 	 This enables switchdev support for TI K3 CPSWxG Ethernet

and it does appear to work, so when you resubmit please feel free to add:

Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Tested-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>

Thanks and sorry for breaking the dependency chain yet again! It takes
time to learn this stuff.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux