Skip to content

Commit

Permalink
dsa: Hide core config options; make drivers select what they need
Browse files Browse the repository at this point in the history
Commit 82167cb ('net: dsa/slave: Fix
compilation warnings') fixed one possible invalid configuration
(NET_DSA enabled with no trailer formats) but added others: drivers
can select NET_DSA without its dependencies being met.

It's not very useful to make either the DSA core or the tagging
formats manually selectable without a driver to use them, so:

1. Define a hidden HAVE_NET_DSA option and move the dependencies of
   NET_DSA to that.  While we're at it, drop the deprecated
   EXPERIMENTAL dependency.
2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
3. Hide the tagging format options again.
4. Make drivers select both NET_DSA and the appropriate tagging format
   option.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Nov 26, 2012
1 parent 53d6841 commit b3422a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
4 changes: 4 additions & 0 deletions drivers/net/dsa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
menu "Distributed Switch Architecture drivers"
depends on HAVE_NET_DSA

config NET_DSA_MV88E6XXX
tristate
default n

config NET_DSA_MV88E6060
tristate "Marvell 88E6060 ethernet switch chip support"
select NET_DSA
select NET_DSA_TAG_TRAILER
---help---
This enables support for the Marvell 88E6060 ethernet switch
Expand All @@ -17,6 +19,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU

config NET_DSA_MV88E6131
tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
select NET_DSA
select NET_DSA_MV88E6XXX
select NET_DSA_MV88E6XXX_NEED_PPU
select NET_DSA_TAG_DSA
Expand All @@ -26,6 +29,7 @@ config NET_DSA_MV88E6131

config NET_DSA_MV88E6123_61_65
tristate "Marvell 88E6123/6161/6165 ethernet switch chip support"
select NET_DSA
select NET_DSA_MV88E6XXX
select NET_DSA_TAG_EDSA
---help---
Expand Down
30 changes: 13 additions & 17 deletions net/dsa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
config HAVE_NET_DSA
def_bool y
depends on NETDEVICES && !S390

# Drivers must select NET_DSA and the appropriate tagging format

config NET_DSA
tristate
default n
depends on EXPERIMENTAL && NETDEVICES && !S390
depends on HAVE_NET_DSA
select PHYLIB
---help---
This allows you to use hardware switch chips that use
the Distributed Switch Architecture.


menu "Distributed Switch Architecture support"
if NET_DSA

# tagging formats
config NET_DSA_TAG_DSA
bool "Original DSA packet tagging format"
select NET_DSA
default n
bool

config NET_DSA_TAG_EDSA
bool "Ethertype DSA packet tagging format"
select NET_DSA
default n
bool

config NET_DSA_TAG_TRAILER
bool "Trailer DSA packet tagging format"
select NET_DSA
default n
endmenu
bool

endif

0 comments on commit b3422a3

Please sign in to comment.