diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-11-26 04:16:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-26 17:10:44 -0500 |
commit | b3422a314c27d2189c05b69cc1654b71315d3d21 (patch) | |
tree | 9e292cd89f014f6627a4bf9d0f462413e1857f21 | |
parent | 53d6841d225b93c20d561878637c3cd307c11648 (diff) |
dsa: Hide core config options; make drivers select what they need
Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('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>
-rw-r--r-- | drivers/net/dsa/Kconfig | 4 | ||||
-rw-r--r-- | net/dsa/Kconfig | 30 |
2 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index 96eae22f612b..b8fe808b7957 100644 --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig | |||
@@ -1,4 +1,5 @@ | |||
1 | menu "Distributed Switch Architecture drivers" | 1 | menu "Distributed Switch Architecture drivers" |
2 | depends on HAVE_NET_DSA | ||
2 | 3 | ||
3 | config NET_DSA_MV88E6XXX | 4 | config NET_DSA_MV88E6XXX |
4 | tristate | 5 | tristate |
@@ -6,6 +7,7 @@ config NET_DSA_MV88E6XXX | |||
6 | 7 | ||
7 | config NET_DSA_MV88E6060 | 8 | config NET_DSA_MV88E6060 |
8 | tristate "Marvell 88E6060 ethernet switch chip support" | 9 | tristate "Marvell 88E6060 ethernet switch chip support" |
10 | select NET_DSA | ||
9 | select NET_DSA_TAG_TRAILER | 11 | select NET_DSA_TAG_TRAILER |
10 | ---help--- | 12 | ---help--- |
11 | This enables support for the Marvell 88E6060 ethernet switch | 13 | This enables support for the Marvell 88E6060 ethernet switch |
@@ -17,6 +19,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU | |||
17 | 19 | ||
18 | config NET_DSA_MV88E6131 | 20 | config NET_DSA_MV88E6131 |
19 | tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support" | 21 | tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support" |
22 | select NET_DSA | ||
20 | select NET_DSA_MV88E6XXX | 23 | select NET_DSA_MV88E6XXX |
21 | select NET_DSA_MV88E6XXX_NEED_PPU | 24 | select NET_DSA_MV88E6XXX_NEED_PPU |
22 | select NET_DSA_TAG_DSA | 25 | select NET_DSA_TAG_DSA |
@@ -26,6 +29,7 @@ config NET_DSA_MV88E6131 | |||
26 | 29 | ||
27 | config NET_DSA_MV88E6123_61_65 | 30 | config NET_DSA_MV88E6123_61_65 |
28 | tristate "Marvell 88E6123/6161/6165 ethernet switch chip support" | 31 | tristate "Marvell 88E6123/6161/6165 ethernet switch chip support" |
32 | select NET_DSA | ||
29 | select NET_DSA_MV88E6XXX | 33 | select NET_DSA_MV88E6XXX |
30 | select NET_DSA_TAG_EDSA | 34 | select NET_DSA_TAG_EDSA |
31 | ---help--- | 35 | ---help--- |
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index 0f5dc344ed92..f5eede1d6cb8 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig | |||
@@ -1,28 +1,24 @@ | |||
1 | config HAVE_NET_DSA | ||
2 | def_bool y | ||
3 | depends on NETDEVICES && !S390 | ||
4 | |||
5 | # Drivers must select NET_DSA and the appropriate tagging format | ||
6 | |||
1 | config NET_DSA | 7 | config NET_DSA |
2 | tristate | 8 | tristate |
3 | default n | 9 | depends on HAVE_NET_DSA |
4 | depends on EXPERIMENTAL && NETDEVICES && !S390 | ||
5 | select PHYLIB | 10 | select PHYLIB |
6 | ---help--- | ||
7 | This allows you to use hardware switch chips that use | ||
8 | the Distributed Switch Architecture. | ||
9 | 11 | ||
10 | 12 | if NET_DSA | |
11 | menu "Distributed Switch Architecture support" | ||
12 | 13 | ||
13 | # tagging formats | 14 | # tagging formats |
14 | config NET_DSA_TAG_DSA | 15 | config NET_DSA_TAG_DSA |
15 | bool "Original DSA packet tagging format" | 16 | bool |
16 | select NET_DSA | ||
17 | default n | ||
18 | 17 | ||
19 | config NET_DSA_TAG_EDSA | 18 | config NET_DSA_TAG_EDSA |
20 | bool "Ethertype DSA packet tagging format" | 19 | bool |
21 | select NET_DSA | ||
22 | default n | ||
23 | 20 | ||
24 | config NET_DSA_TAG_TRAILER | 21 | config NET_DSA_TAG_TRAILER |
25 | bool "Trailer DSA packet tagging format" | 22 | bool |
26 | select NET_DSA | 23 | |
27 | default n | 24 | endif |
28 | endmenu | ||