Re: [patch] e1000=y && e1000e=m regression fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, April 11, 2008 - 10:34 am

On Fri, 11 Apr 2008, Christoph Hellwig wrote:

I think that's a great solution.

Here's a suggested patch. Not much tested, but it's fairly obvious.

It basically makes one top-level config option (E1000) to pick the driver 
at all, and two sub-options (E1000_PCI and E1000_PCIE) that you can choose 
between.

If you pick E1000 support, you're given the choice between "PCI only", 
"PCI-E only" or "support both", and that will then pick the right 
combination of support for E1000_PCI and E1000_PCIE.

This also does imply that you cannot mix the "module-ness" of the two 
drivers, because you choose whether the E1000 support (in general) is 
going to be a module or built-in, and that choice will automatically 
affect the sub-choices.

I do think that this makes the whole driver status much more obvious.

(It does mean that if you chose E1000E before, and chose _not_ to support 
E1000 at all, you will now not even be asked about PCI-E support, because 
you've effectively said "no" to E1000 support in the first place. If we 
want to avoid that, then the top-level E1000 config variable should 
probably be renamed to E1000_SUPPORT or something like that).

		Linus

---
 drivers/net/Kconfig         |   52 +++++++++++++++++++++++-------------------
 drivers/net/Makefile        |    4 +-
 drivers/net/e1000/Makefile  |    2 +-
 drivers/net/e1000e/Makefile |    2 +-
 4 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 3a0b20a..6968e20 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1979,9 +1979,35 @@ config E1000
 	  To compile this driver as a module, choose M here. The module
 	  will be called e1000.
 
+choice
+	prompt "E1000 bus type support"
+	depends on E1000
+	default E1000_BOTH
+	help
+	  Choose PCI or PCI-E support for E1000 driver
+
+config E1000_PCI_ONLY
+	bool "Support only older E1000 PCI cards"
+
+config E1000_PCIE_ONLY
+	bool "Support newer E1000 PCI-E cards"
+
+config E1000_BOTH
+	bool "Support all E1000 cards"
+
+endchoice
+
+config E1000_PCI
+	tristate
+	default E1000 && !E1000_PCIE_ONLY
+
+config E1000_PCIE
+	tristate
+	default E1000 && !E1000_PCI_ONLY
+
 config E1000_NAPI
 	bool "Use Rx Polling (NAPI)"
-	depends on E1000
+	depends on E1000_PCI
 	help
 	  NAPI is a new driver API designed to reduce CPU and interrupt load
 	  when the driver is receiving lots of packets from the card. It is
@@ -1995,35 +2021,13 @@ config E1000_NAPI
 
 config E1000_DISABLE_PACKET_SPLIT
 	bool "Disable Packet Split for PCI express adapters"
-	depends on E1000
+	depends on E1000_PCI
 	help
 	  Say Y here if you want to use the legacy receive path for PCI express
 	  hardware.
 
 	  If in doubt, say N.
 
-config E1000E
-	tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support"
-	depends on PCI
-	---help---
-	  This driver supports the PCI-Express Intel(R) PRO/1000 gigabit
-	  ethernet family of adapters. For PCI or PCI-X e1000 adapters,
-	  use the regular e1000 driver For more information on how to
-	  identify your adapter, go to the Adapter & Driver ID Guide at:
-
-	  <http://support.intel.com/support/network/adapter/pro100/21397.htm>
-
-	  For general information and support, go to the Intel support
-	  website at:
-
-	  <http://support.intel.com>
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called e1000e.
-
-config E1000E_ENABLED
-	def_bool E1000E != n
-
 config IP1000
 	tristate "IP1000 Gigabit Ethernet support"
 	depends on PCI && EXPERIMENTAL
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 3b1ea32..c1bead0 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -2,8 +2,8 @@
 # Makefile for the Linux network (ethercard) device drivers.
 #
 
-obj-$(CONFIG_E1000) += e1000/
-obj-$(CONFIG_E1000E) += e1000e/
+obj-$(CONFIG_E1000_PCI) += e1000/
+obj-$(CONFIG_E1000_PCIE) += e1000e/
 obj-$(CONFIG_IBM_EMAC) += ibm_emac/
 obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/
 obj-$(CONFIG_IGB) += igb/
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 4a6ab15..431052b 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -30,6 +30,6 @@
 # Makefile for the Intel(R) PRO/1000 ethernet driver
 #
 
-obj-$(CONFIG_E1000) += e1000.o
+obj-$(CONFIG_E1000_PCI) += e1000.o
 
 e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
diff --git a/drivers/net/e1000e/Makefile b/drivers/net/e1000e/Makefile
index 650f866..a1e977e 100644
--- a/drivers/net/e1000e/Makefile
+++ b/drivers/net/e1000e/Makefile
@@ -30,7 +30,7 @@
 # Makefile for the Intel(R) PRO/1000 ethernet driver
 #
 
-obj-$(CONFIG_E1000E) += e1000e.o
+obj-$(CONFIG_E1000_PCIE) += e1000e.o
 
 e1000e-objs := 82571.o ich8lan.o es2lan.o \
 	       lib.o phy.o param.o ethtool.o netdev.o
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [regression] e1000e broke e1000 (was: Re: [ANNOUNCE] e ..., Brandeburg, Jesse, (Tue Apr 8, 12:43 pm)
Re: [regression] e1000e broke e1000, Jeff Garzik, (Tue Apr 8, 12:56 pm)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Tue Apr 8, 1:06 pm)
Re: [regression] e1000e broke e1000, Dan Noe, (Tue Apr 8, 1:12 pm)
showing which hardware is unclaimed, Rick Jones, (Tue Apr 8, 1:13 pm)
Re: [regression] e1000e broke e1000, Jeff Garzik, (Tue Apr 8, 1:19 pm)
Re: [regression] e1000e broke e1000, Matthew Wilcox, (Tue Apr 8, 1:20 pm)
Re: [regression] e1000e broke e1000, Kok, Auke, (Tue Apr 8, 1:31 pm)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Tue Apr 8, 1:33 pm)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Tue Apr 8, 1:35 pm)
Re: showing which hardware is unclaimed, Martin Mares, (Tue Apr 8, 1:35 pm)
Re: [regression] e1000e broke e1000, Martin Mares, (Tue Apr 8, 1:36 pm)
Re: [regression] e1000e broke e1000, Dan Noe, (Tue Apr 8, 1:39 pm)
Re: [E1000-devel] [regression] e1000e broke e1000, Kok, Auke, (Tue Apr 8, 1:47 pm)
Re: [regression] e1000e broke e1000, Jeff Garzik, (Tue Apr 8, 1:56 pm)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Wed Apr 9, 12:12 pm)
Re: [regression] e1000e broke e1000, Jeff Garzik, (Wed Apr 9, 12:33 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Jeff Garzik, (Wed Apr 9, 12:50 pm)
Re: [regression] e1000e broke e1000, Bill Davidsen, (Wed Apr 9, 5:52 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Ingo Molnar, (Thu Apr 10, 12:27 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Chris Friesen, (Thu Apr 10, 2:20 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Randy Dunlap, (Thu Apr 10, 2:44 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Philip Craig, (Thu Apr 10, 5:46 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Andi Kleen, (Fri Apr 11, 12:54 am)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Fri Apr 11, 1:59 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Ingo Molnar, (Fri Apr 11, 4:26 am)
Re: [regression] e1000e broke e1000, Ingo Molnar, (Fri Apr 11, 4:30 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Christoph Hellwig, (Fri Apr 11, 4:36 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Ingo Molnar, (Fri Apr 11, 5:16 am)
Re: [regression] e1000e broke e1000, Chris Friesen, (Fri Apr 11, 8:40 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Christoph Hellwig, (Fri Apr 11, 9:45 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Martin Mares, (Fri Apr 11, 10:10 am)
Re: [patch] e1000=y && e1000e=m regression fix, Linus Torvalds, (Fri Apr 11, 10:34 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Matthew Wilcox, (Fri Apr 11, 10:53 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Linus Torvalds, (Fri Apr 11, 11:51 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Matthew Wilcox, (Fri Apr 11, 12:01 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Willy Tarreau, (Fri Apr 11, 12:25 pm)
Re: [regression] e1000e broke e1000, Willy Tarreau, (Fri Apr 11, 12:29 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Matthew Wilcox, (Fri Apr 11, 12:38 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Linus Torvalds, (Fri Apr 11, 1:21 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Krzysztof Halasa, (Fri Apr 11, 1:22 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Linus Torvalds, (Fri Apr 11, 1:29 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Daniel Barkalow, (Fri Apr 11, 3:06 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Jeff Garzik, (Fri Apr 11, 3:21 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Linus Torvalds, (Fri Apr 11, 4:00 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Daniel Barkalow, (Fri Apr 11, 4:05 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Daniel Barkalow, (Fri Apr 11, 4:15 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Jeff Garzik, (Fri Apr 11, 4:43 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Christoph Hellwig, (Sat Apr 12, 6:07 am)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Linus Torvalds, (Sun Apr 13, 2:13 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Ondrej Zary, (Sun Apr 13, 2:34 pm)
Re: [patch] e1000=y &amp;&amp; e1000e=m regression fix, Ingo Molnar, (Mon Jun 9, 12:24 pm)