Skip to contentSkip to conversation

Mostly revert "e1000/e1000e: Move PCI-Express device IDs over to e1000e"

DISCUSSION Randy Dunlap 7 participants 8 messages Jan 30, 2008 – Jan 31, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 15 lines · On Tue, 29 Jan 2008 23:59:37 GMT Linux Kernel Mailing List wrote:
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5b10ca19ea4859d3884d10a3eb8495de92089792
Commit:     5b10ca19ea4859d3884d10a3eb8495de92089792
Parent:     9e97198dbf318be7958b57900d05b37c7e09ad7c
Author:     Linus Torvalds <[email protected]>
AuthorDate: Wed Jan 30 09:54:54 2008 +1100
Committer:  Linus Torvalds <[email protected]>
CommitDate: Wed Jan 30 09:54:54 2008 +1100

Mostly revert "e1000/e1000e: Move PCI-Express device IDs over to e1000e"

The new e1000e driver is apparently not yet suitable for general use, so mark it experimental, and re-instate all the PCI-Express device IDs in the old and stable e1000 driver so that people (namely me) can continue to use a driver that actually works.

Quoted 6 lines

Auke & co have been appraised of the situation.

Cc Auke Kok <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David Miller <[email protected]>

Andrew was concerned about this when the driver was in -mm. He asked for a patch that would set E1000E to same value as E1000 and I supplied that. Auke acked it IIRC. Other people vetoed it. :(

Quoted 56 lines
---
 drivers/net/Kconfig            |    2 +-
 drivers/net/e1000/e1000_main.c |   27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletions(-)
drivers/net/Kconfig +1 -1
index af40ff4..5a2d1dd 100644
@@ -1992,7 +1992,7 @@ config E1000_DISABLE_PACKET_SPLIT
 
 config E1000E
 	tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support"
-	depends on PCI
+	depends on PCI && EXPERIMENTAL
 	---help---
 	  This driver supports the PCI-Express Intel(R) PRO/1000 gigabit
 	  ethernet family of adapters. For PCI or PCI-X e1000 adapters,
drivers/net/e1000/e1000_main.c +20 -0
index 7f5b2ae..3111af6 100644
@@ -73,6 +73,14 @@ static struct pci_device_id e1000_pci_tbl[] = {
 	INTEL_E1000_ETHERNET_DEVICE(0x1026),
 	INTEL_E1000_ETHERNET_DEVICE(0x1027),
 	INTEL_E1000_ETHERNET_DEVICE(0x1028),
+	INTEL_E1000_ETHERNET_DEVICE(0x1049),
+	INTEL_E1000_ETHERNET_DEVICE(0x104A),
+	INTEL_E1000_ETHERNET_DEVICE(0x104B),
+	INTEL_E1000_ETHERNET_DEVICE(0x104C),
+	INTEL_E1000_ETHERNET_DEVICE(0x104D),
+	INTEL_E1000_ETHERNET_DEVICE(0x105E),
+	INTEL_E1000_ETHERNET_DEVICE(0x105F),
+	INTEL_E1000_ETHERNET_DEVICE(0x1060),
 	INTEL_E1000_ETHERNET_DEVICE(0x1075),
 	INTEL_E1000_ETHERNET_DEVICE(0x1076),
 	INTEL_E1000_ETHERNET_DEVICE(0x1077),
@@ -81,9 +89,28 @@ static struct pci_device_id e1000_pci_tbl[] = {
 	INTEL_E1000_ETHERNET_DEVICE(0x107A),
 	INTEL_E1000_ETHERNET_DEVICE(0x107B),
 	INTEL_E1000_ETHERNET_DEVICE(0x107C),
+	INTEL_E1000_ETHERNET_DEVICE(0x107D),
+	INTEL_E1000_ETHERNET_DEVICE(0x107E),
+	INTEL_E1000_ETHERNET_DEVICE(0x107F),
 	INTEL_E1000_ETHERNET_DEVICE(0x108A),
+	INTEL_E1000_ETHERNET_DEVICE(0x108B),
+	INTEL_E1000_ETHERNET_DEVICE(0x108C),
+	INTEL_E1000_ETHERNET_DEVICE(0x1096),
+	INTEL_E1000_ETHERNET_DEVICE(0x1098),
 	INTEL_E1000_ETHERNET_DEVICE(0x1099),
+	INTEL_E1000_ETHERNET_DEVICE(0x109A),
+	INTEL_E1000_ETHERNET_DEVICE(0x10A4),
+	INTEL_E1000_ETHERNET_DEVICE(0x10A5),
 	INTEL_E1000_ETHERNET_DEVICE(0x10B5),
+	INTEL_E1000_ETHERNET_DEVICE(0x10B9),
+	INTEL_E1000_ETHERNET_DEVICE(0x10BA),

drivers/net/e1000/e1000_main.c static struct pci_device_id e1000_pci_tbl[] = { · line 116

Quoted 10 lines
drivers/net/e1000/e1000_main.c +7 -0
+	INTEL_E1000_ETHERNET_DEVICE(0x10BB),
+	INTEL_E1000_ETHERNET_DEVICE(0x10BC),
+	INTEL_E1000_ETHERNET_DEVICE(0x10C4),
+	INTEL_E1000_ETHERNET_DEVICE(0x10C5),
+	INTEL_E1000_ETHERNET_DEVICE(0x10D5),
+	INTEL_E1000_ETHERNET_DEVICE(0x10D9),
+	INTEL_E1000_ETHERNET_DEVICE(0x10DA),
 	/* required last entry */
 	{0,}
 };

---
~Randy

#2 lore raw
Quoted 4 lines · Randy Dunlap

Andrew was concerned about this when the driver was in -mm. He asked for a patch that would set E1000E to same value as E1000 and I supplied that. Auke acked it IIRC. Other people vetoed it. :(

Yeah, I've been discussing with Jeff and the gang.

I think we have agreed on a solution where the ID's show up in the old driver if the new driver is not enabled at all.

(And as a side note: it turns out that the problem I experienced didn't come from the new e1000e driver after all, so I'll be removing the EXPERIMENTAL flag again).

So I'd suggest the final patch be something like this, but I'm sendign it out just as an example of how we could solve this, not necessarily as a final patch.

Jeff, Auke, would something like this be acceptable? It makes it very obvious in the driver table which entries are for the PCIE versions that would be handled by the E1000E driver if it is enabled..

Untested, but as mentioned, this is more of a "this looks maintainable and like it should solve the issues" rather than anything I was planning on committing now.

Linus

---
 drivers/net/Kconfig            |    5 ++-
 drivers/net/e1000/e1000_main.c |   60 ++++++++++++++++++++++------------------
 2 files changed, 37 insertions(+), 28 deletions(-)
drivers/net/Kconfig +4 -1
index 5a2d1dd..6c57540 100644
@@ -1992,7 +1992,7 @@ config E1000_DISABLE_PACKET_SPLIT
 
 config E1000E
 	tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support"
-	depends on PCI && EXPERIMENTAL
+	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,
@@ -2009,6 +2009,9 @@ config E1000E
 	  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
drivers/net/e1000/e1000_main.c +33 -27

81 lines not on this page · raw message

#3 lore raw
Quoted 4 lines · Linus Torvalds

Untested, but as mentioned, this is more of a "this looks maintainable and like it should solve the issues" rather than anything I was planning on committing now.

Side note: I "verified" this patch by also diffing it against the HEAD^ state (before adding the PCIE ID's back in), to check that I marked exactly the right entries as PCIE() entries.

So while it's not tested, at least it looks right from two different angles ;)

Linus

#4 lore raw
In reply to Linus Torvalds
Quoted 52 lines · Linus Torvalds
Quoted 3 lines · Randy Dunlap

Andrew was concerned about this when the driver was in -mm. He asked for a patch that would set E1000E to same value as E1000 and I supplied that. Auke acked it IIRC. Other people vetoed it. :(

Yeah, I've been discussing with Jeff and the gang.

I think we have agreed on a solution where the ID's show up in the old driver if the new driver is not enabled at all.

(And as a side note: it turns out that the problem I experienced didn't come from the new e1000e driver after all, so I'll be removing the EXPERIMENTAL flag again).

So I'd suggest the final patch be something like this, but I'm sendign it out just as an example of how we could solve this, not necessarily as a final patch.

Jeff, Auke, would something like this be acceptable? It makes it very obvious in the driver table which entries are for the PCIE versions that would be handled by the E1000E driver if it is enabled..

Untested, but as mentioned, this is more of a "this looks maintainable and like it should solve the issues" rather than anything I was planning on committing now.

Linus

---
 drivers/net/Kconfig            |    5 ++-
 drivers/net/e1000/e1000_main.c |   60 ++++++++++++++++++++++------------------
 2 files changed, 37 insertions(+), 28 deletions(-)
drivers/net/Kconfig +4 -1
index 5a2d1dd..6c57540 100644
@@ -1992,7 +1992,7 @@ config E1000_DISABLE_PACKET_SPLIT
 
 config E1000E
 	tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support"
-	depends on PCI && EXPERIMENTAL
+	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,
@@ -2009,6 +2009,9 @@ config E1000E
 	  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
drivers/net/e1000/e1000_main.c +0 -0
index 3111af6..8c87940 100644

drivers/net/e1000/e1000_main.c static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation · line 54

Quoted 8 lines
drivers/net/e1000/e1000_main.c +5 -0
@@ -47,6 +47,12 @@ static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation
  * Macro expands to...
  *   {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
  */
+#ifdef CONFIG_E1000E_ENABLED
+  #define PCIE(x) 
+#else
+  #define PCIE(x) x,
+#endif

Patch gets my ACK, if you like, though an improvement would be to have your Kconfig logic activate CONFIG_E1000_PCIEX. Then future janitors could come along and disable unused code in addition to PCI IDs.

Jeff

#5 lore raw
Quoted 68 lines · Jeff Garzik
Quoted 67 lines · Linus Torvalds
Quoted 3 lines · Randy Dunlap

Andrew was concerned about this when the driver was in -mm. He asked for a patch that would set E1000E to same value as E1000 and I supplied that. Auke acked it IIRC. Other people vetoed it. :(

Yeah, I've been discussing with Jeff and the gang.

I think we have agreed on a solution where the ID's show up in the old driver if the new driver is not enabled at all.

(And as a side note: it turns out that the problem I experienced didn't come from the new e1000e driver after all, so I'll be removing the EXPERIMENTAL flag again).

So I'd suggest the final patch be something like this, but I'm sendign it out just as an example of how we could solve this, not necessarily as a final patch.

Jeff, Auke, would something like this be acceptable? It makes it very obvious in the driver table which entries are for the PCIE versions that would be handled by the E1000E driver if it is enabled..

Untested, but as mentioned, this is more of a "this looks maintainable and like it should solve the issues" rather than anything I was planning on committing now.

Linus

---
 drivers/net/Kconfig            |    5 ++-
 drivers/net/e1000/e1000_main.c |   60
++++++++++++++++++++++------------------
 2 files changed, 37 insertions(+), 28 deletions(-)
drivers/net/Kconfig +4 -1
index 5a2d1dd..6c57540 100644
@@ -1992,7 +1992,7 @@ config E1000_DISABLE_PACKET_SPLIT
 
 config E1000E
     tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support"
-    depends on PCI && EXPERIMENTAL
+    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,
@@ -2009,6 +2009,9 @@ config E1000E
       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
drivers/net/e1000/e1000_main.c +0 -0
index 3111af6..8c87940 100644
@@ -47,6 +47,12 @@ static const char e1000_copyright[] = "Copyright

(c) 1999-2006 Intel Corporation
* Macro expands to...
* {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
*/

Quoted 8 lines

drivers/net/e1000/e1000_main.c static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation · line 54

Quoted 4 lines
drivers/net/e1000/e1000_main.c +4 -0
+#ifdef CONFIG_E1000E_ENABLED
+  #define PCIE(x) +#else
+  #define PCIE(x) x,
+#endif

Patch gets my ACK, if you like, though an improvement would be to have your Kconfig logic activate CONFIG_E1000_PCIEX. Then future janitors could come along and disable unused code in addition to PCI IDs.

Ack from my side as well, allthough I hope that this code will not live long as I would love to start taking out pci-e code out of e1000. If we merge this patch then I suggest that we don't do that until for at least a whole cycle, since it does not make much sense otherwise.

Auke

#6 lore raw
In reply to Linus Torvalds
Quoted 21 lines · Linus Torvalds
Quoted 4 lines · Randy Dunlap

Andrew was concerned about this when the driver was in -mm. He asked for a patch that would set E1000E to same value as E1000 and I supplied that. Auke acked it IIRC. Other people vetoed it. :(

Yeah, I've been discussing with Jeff and the gang.

I think we have agreed on a solution where the ID's show up in the old driver if the new driver is not enabled at all.

(And as a side note: it turns out that the problem I experienced didn't come from the new e1000e driver after all, so I'll be removing the EXPERIMENTAL flag again).

So I'd suggest the final patch be something like this, but I'm sendign it out just as an example of how we could solve this, not necessarily as a final patch.

Quoted 7 lines

Jeff, Auke, would something like this be acceptable? It makes it very obvious in the driver table which entries are for the PCIE versions that would be handled by the E1000E driver if it is enabled..

Untested, but as mentioned, this is more of a "this looks maintainable and like it should solve the issues" rather than anything I was planning on committing now.

I don't like it:

We should aim at having exactly one driver for one card.

Your patch has effects like e.g. a kernel behaving differently when adding and compiling the e1000e module later compared to having it originally in the .config.

And fun like "The card works on my machine with the e1000 driver, why doesn't it work in your machine with the e1000 driver?".

And in terms of maintainability, people will disable the e1000e driver in their kernel for working around bugs in it instead of reporting the bugs. Exactly what we want to not happen.

And unless we want to keep this situation forever, we anyway have to remove the support for the PCI-Express adapters from the e1000 driver at some point in time, so why not make a clear cut now? Whatever problems this causes will be the same now or in a few years.

Quoted 1 line

Linus

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#7 lore raw
Quoted 6 lines · Adrian Bunk
Quoted 3 lines

Jeff, Auke, would something like this be acceptable? It makes it very obvious in the driver table which entries are for the PCIE versions that would be handled by the E1000E driver if it is enabled..

I don't like it:
We should aim at having exactly one driver for one card.

There is one thing I don't understand, but that may well be just me...

Quoted 3 lines

From Linus' original patch:
+++ b/drivers/net/e1000/e1000_main.c
+ INTEL_E1000_ETHERNET_DEVICE(0x108C),

So, apparently support for 8086:108c was removed from the e1000 driver.

Quoted 1 line

From my lspci:

$ lspci -nn | grep Ether
01:00.0 Ethernet controller [0200]: Intel Corporation 82573E Gigabit Ethernet Controller (Copper) [8086:108c] (rev 03)

But when I look at where that card is sitting:

$ readlink pci/devices/0000\:01\:00.0/driver
../../../../bus/pci/drivers/e1000

So, it's on the PCI bus, not on the PCI-Express bus (which I also have, but which has no devices on it).

Or does the e1000e driver also support cards on the PCI bus?

If that's the case then the original changelog entry "Move PCI-Express device IDs over to e1000e" is misleading as it's not only PCI-Express devices...

Hmmm. Or does which driver is loaded decide on which bus the device ends up?

Confused,
FJP

#8 lore raw
Quoted 8 lines · Frans Pop

There is one thing I don't understand, but that may well be just me...

From Linus' original patch:

Quoted 2 lines

+++ b/drivers/net/e1000/e1000_main.c
+ INTEL_E1000_ETHERNET_DEVICE(0x108C),

So, apparently support for 8086:108c was removed from the e1000 driver.

When it was enabled to be supported by e1000e.

Quoted 5 lines

From my lspci:

$ lspci -nn | grep Ether
01:00.0 Ethernet controller [0200]: Intel Corporation 82573E Gigabit
Ethernet Controller (Copper) [8086:108c] (rev 03) 
Quoted 7 lines

But when I look at where that card is sitting:

$ readlink pci/devices/0000\:01\:00.0/driver
../../../../bus/pci/drivers/e1000

So, it's on the PCI bus, not on the PCI-Express bus (which I also have, but
which has no devices on it).

82573E/L are PCIe devices only, don't let the use of "PCI configuration space" confuse you. All PCIe devices support PCI configuration space. This allows systems with PCIe to work right (or mostly right) with all the PCI supporting software like Linux.

Quoted 1 line

Or does the e1000e driver also support cards on the PCI bus?

E1000e is targeted at the PCIe devices only.

Quoted 3 lines

If that's the case then the original changelog entry "Move PCI-Express device IDs over to e1000e" is misleading as it's not only PCI-Express devices...

Unfortunate bit of confusion over terminology.

Quoted 2 lines

Hmmm. Or does which driver is loaded decide on which bus the device ends up?

Hope this helped,
Jesse