lkml.org 
[lkml]   [2008]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Mostly revert "e1000/e1000e: Move PCI-Express device IDs over to e1000e"


    On Tue, 29 Jan 2008, Randy Dunlap wrote:
    >
    > 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(-)

    diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
    index 5a2d1dd..6c57540 100644
    --- a/drivers/net/Kconfig
    +++ b/drivers/net/Kconfig
    @@ -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
    diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
    index 3111af6..8c87940 100644
    --- a/drivers/net/e1000/e1000_main.c
    +++ b/drivers/net/e1000/e1000_main.c
    @@ -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
    +
    static struct pci_device_id e1000_pci_tbl[] = {
    INTEL_E1000_ETHERNET_DEVICE(0x1000),
    INTEL_E1000_ETHERNET_DEVICE(0x1001),
    @@ -73,14 +79,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),
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1049))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104A))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104B))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104C))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x104D))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x105E))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x105F))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1060))
    INTEL_E1000_ETHERNET_DEVICE(0x1075),
    INTEL_E1000_ETHERNET_DEVICE(0x1076),
    INTEL_E1000_ETHERNET_DEVICE(0x1077),
    @@ -89,28 +95,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),
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x107D))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x107E))
    +PCIE( 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),
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x108B))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x108C))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x1096))
    +PCIE( 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),
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x109A))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10A4))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10A5))
    INTEL_E1000_ETHERNET_DEVICE(0x10B5),
    - INTEL_E1000_ETHERNET_DEVICE(0x10B9),
    - INTEL_E1000_ETHERNET_DEVICE(0x10BA),
    - 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),
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10B9))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BA))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BB))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10BC))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10C4))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10C5))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10D5))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10D9))
    +PCIE( INTEL_E1000_ETHERNET_DEVICE(0x10DA))
    /* required last entry */
    {0,}
    };

    \
     
     \ /
      Last update: 2008-01-30 06:55    [W:0.058 / U:29.776 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site