mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Kok, Auke" <auke-jan.h.kok@intel.com>,
	Ingo Molnar <mingo@elte.hu>, Jeff Garzik <jeff@garzik.org>,
	Matthew Wilcox <matthew@wil.cx>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	NetDev <netdev@vger.kernel.org>,
	e1000-list <e1000-devel@lists.sourceforge.net>,
	linux-pci maillist <linux-pci@atrey.karlin.mff.cuni.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"Ronciak, John" <john.ronciak@intel.com>,
	"Allan, Bruce W" <bruce.w.allan@intel.com>,
	Greg KH <greg@kroah.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [patch] e1000=y && e1000e=m regression fix
Date: Fri, 11 Apr 2008 10:34:01 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.00.0804111028540.3143@woody.linux-foundation.org> (raw)
In-Reply-To: <20080411164542.GA4066@infradead.org>



On Fri, 11 Apr 2008, Christoph Hellwig wrote:
> 
> As a start we could do two driver keyed off a single Kconfig variable.
> And then find a way to get users informed that they might need to
> enabled the other one

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

  parent reply	other threads:[~2008-04-11 17:35 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 21:11 [ANNOUNCE] e1000 to e1000e migration of PCI Express devices Kok, Auke
2008-04-04 21:31 ` Dave Hansen
2008-04-04 21:49   ` [E1000-devel] " Kok, Auke
2008-04-04 21:52   ` Jeff Garzik
     [not found] ` <20080408083606.GA20863@elte.hu>
2008-04-08 14:21   ` Jeff Garzik
2008-04-08 15:08     ` Jeff Garzik
2008-04-08 14:56   ` Andi Kleen
     [not found]   ` <47FB9ABB.9080403@intel.com>
2008-04-08 18:15     ` Ingo Molnar
2008-04-08 18:39     ` [regression] e1000e broke e1000 (was: Re: [ANNOUNCE] e1000 to e1000e migration of PCI Express devices) Ingo Molnar
2008-04-08 19:32       ` Matthew Wilcox
2008-04-08 19:51         ` Ingo Molnar
2008-04-08 19:56           ` [regression] e1000e broke e1000 Jeff Garzik
2008-04-08 20:06             ` Ingo Molnar
2008-04-08 20:19               ` Jeff Garzik
2008-04-08 20:33                 ` Ingo Molnar
2008-04-08 20:47                   ` [E1000-devel] " Kok, Auke
2008-04-08 20:56                   ` Jeff Garzik
2008-04-09 19:38                     ` [patch] e1000=y && e1000e=m regression fix (was: Re: [regression] e1000e broke e1000) Ingo Molnar
2008-04-09 19:50                       ` [patch] e1000=y && e1000e=m regression fix Jeff Garzik
2008-04-09 20:04                         ` Ingo Molnar
2008-04-09 20:12                       ` Kok, Auke
2008-04-09 20:53                         ` Ingo Molnar
2008-04-10 18:29                         ` Kok, Auke
2008-04-10 19:27                           ` Ingo Molnar
2008-04-10 21:23                             ` Kok, Auke
2008-04-10 21:44                               ` Randy Dunlap
2008-04-10 21:52                                 ` Kok, Auke
2008-04-11  7:54                                 ` Andi Kleen
2008-04-11  0:46                               ` Philip Craig
2008-04-11 11:26                               ` Ingo Molnar
2008-04-11 11:36                                 ` Christoph Hellwig
2008-04-11 12:16                                   ` Ingo Molnar
2008-04-11 16:22                                     ` Kok, Auke
2008-04-11 16:45                                       ` Christoph Hellwig
2008-04-11 17:26                                         ` Kok, Auke
2008-04-11 17:34                                         ` Linus Torvalds [this message]
2008-04-11 17:53                                           ` Matthew Wilcox
2008-04-11 18:51                                             ` Linus Torvalds
2008-04-11 19:01                                               ` Matthew Wilcox
2008-04-11 19:25                                                 ` Willy Tarreau
2008-04-11 19:38                                                   ` Matthew Wilcox
2008-04-11 20:21                                                 ` Linus Torvalds
2008-04-11 20:22                                               ` Krzysztof Halasa
2008-04-11 20:29                                                 ` Linus Torvalds
2008-04-11 21:01                                               ` Dan Noe
2008-04-11 22:06                                           ` Daniel Barkalow
2008-04-11 22:21                                             ` Jeff Garzik
2008-04-11 23:05                                               ` Daniel Barkalow
2008-04-11 23:00                                             ` Linus Torvalds
2008-04-11 23:15                                               ` Daniel Barkalow
2008-04-11 23:43                                               ` Jeff Garzik
2008-04-11 23:58                                                 ` david
2008-04-12 13:07                                                 ` Christoph Hellwig
2008-04-13 21:13                                                 ` Linus Torvalds
2008-04-13 21:34                                                   ` Ondrej Zary
2008-06-09 19:24                                                   ` Ingo Molnar
2008-04-11 17:10                                       ` Martin Mares
2008-04-09 20:49                       ` [patch] e1000=y && e1000e=m regression fix (was: Re: [regression] e1000e broke e1000) Frans Pop
2008-04-09 23:59                         ` Krzysztof Halasa
2008-04-10  1:40                           ` Linus Torvalds
2008-04-10  9:57                             ` Krzysztof Halasa
2008-04-10 14:30                               ` Linus Torvalds
2008-04-10 17:55                                 ` Grant Grundler
2008-04-10 18:04                                   ` Matthew Wilcox
2008-04-10 18:26                                     ` [patch] e1000=y && e1000e=m regression fix Kok, Auke
2008-04-10 21:20                                       ` Chris Friesen
2008-04-10 19:27                                   ` [patch] e1000=y && e1000e=m regression fix (was: Re: [regression] e1000e broke e1000) Linus Torvalds
2008-04-10 21:35                                 ` Krzysztof Halasa
2008-04-08 20:31               ` [regression] e1000e broke e1000 Kok, Auke
2008-04-09 19:12                 ` Ingo Molnar
2008-04-09 19:33                   ` Jeff Garzik
2008-04-11 11:30                     ` Ingo Molnar
2008-04-11 15:40                       ` Chris Friesen
2008-04-11 19:29                         ` Willy Tarreau
2008-04-10  0:52           ` Bill Davidsen
2008-04-11  8:59             ` Ingo Molnar
2008-04-08 19:43       ` [regression] e1000e broke e1000 (was: Re: [ANNOUNCE] e1000 toe1000e migration of PCI Express devices) Brandeburg, Jesse
2008-04-08 19:59         ` Ingo Molnar
2008-04-08 20:04           ` Matthew Wilcox
2008-04-08 20:12             ` [regression] e1000e broke e1000 Dan Noe
2008-04-08 20:20               ` Matthew Wilcox
2008-04-08 20:35                 ` Ingo Molnar
2008-04-08 20:36                   ` Martin Mares
2008-04-08 20:39                 ` Dan Noe
2008-04-08 20:13             ` showing which hardware is unclaimed Rick Jones
2008-04-08 20:35               ` Martin Mares
2008-04-08 20:17             ` [regression] e1000e broke e1000 (was: Re: [ANNOUNCE] e1000 toe1000e migration of PCI Express devices) Ingo Molnar
     [not found]   ` <20080409190836.GA9276@elte.hu>
2008-04-09 19:38     ` [ANNOUNCE] e1000 to e1000e migration of PCI Express devices Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0804111028540.3143@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=hch@infradead.org \
    --cc=jeff@garzik.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=matthew@wil.cx \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®