diff mbox

[v3,3/3] e1000: remove broken support for 82573L

Message ID 1401593596-8953-4-git-send-email-somlo@cmu.edu
State New
Headers show

Commit Message

Gabriel L. Somlo June 1, 2014, 3:33 a.m. UTC
Currently, e1000 support is based on the manual for the 8254xx
model series. 82573x models are documented in a separate manual
(see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf)
and the 82573L device ID no longer works correctly on either Linux
(3.14.*) or Windows 7.

This patch removes stale code claiming to support 82573L, cleaning
up the code base for the remaining 8254xx model series.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
 hw/net/e1000.c     | 18 ------------------
 tests/e1000-test.c |  1 -
 2 files changed, 19 deletions(-)

Comments

Peter Crosthwaite June 1, 2014, 9:25 a.m. UTC | #1
On Sun, Jun 1, 2014 at 1:33 PM, Gabriel L. Somlo <gsomlo@gmail.com> wrote:
> Currently, e1000 support is based on the manual for the 8254xx
> model series. 82573x models are documented in a separate manual
> (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf)
> and the 82573L device ID no longer works correctly on either Linux
> (3.14.*) or Windows 7.
>
> This patch removes stale code claiming to support 82573L, cleaning
> up the code base for the remaining 8254xx model series.
>
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
>  hw/net/e1000.c     | 18 ------------------
>  tests/e1000-test.c |  1 -
>  2 files changed, 19 deletions(-)
>
> diff --git a/hw/net/e1000.c b/hw/net/e1000.c
> index 4e208e3..3ae5b43 100644
> --- a/hw/net/e1000.c
> +++ b/hw/net/e1000.c
> @@ -70,8 +70,6 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
>  /*
>   * HW models:
>   *  E1000_DEV_ID_82540EM works with Windows, Linux, and OS X <= 10.8
> - *  E1000_DEV_ID_82573L OK with windoze and Linux 2.6.22,
> - *     appears to perform better than 82540EM, but breaks with Linux 2.6.18
>   *  E1000_DEV_ID_82544GC_COPPER appears to work; not well tested
>   *  E1000_DEV_ID_82545EM_COPPER works with Linux and OS X >= 10.6
>   *  Others never tested
> @@ -144,7 +142,6 @@ typedef struct E1000State_st {
>  typedef struct E1000DeviceClass {
>      PCIDeviceClass parent_class;
>      uint16_t phy_id2;
> -    bool is_8257xx;
>  } E1000DeviceClass;
>
>  #define TYPE_E1000_BASE "e1000-base"
> @@ -271,15 +268,9 @@ static void
>  set_interrupt_cause(E1000State *s, int index, uint32_t val)
>  {
>      PCIDevice *d = PCI_DEVICE(s);
> -    E1000DeviceClass *edc = E1000_DEVICE_GET_CLASS(d);
>      uint32_t pending_ints;
>      uint32_t mit_delay;
>
> -    if (val && edc->is_8257xx) {
> -        /* hack only for 8257xx models */
> -        val |= E1000_ICR_INT_ASSERTED;
> -    }
> -
>      s->mac_reg[ICR] = val;
>
>      /*
> @@ -1581,7 +1572,6 @@ typedef struct E1000Info_st {
>      uint16_t   device_id;
>      uint8_t    revision;
>      uint16_t   phy_id2;
> -    bool       is_8257xx;
>  } E1000Info;
>
>  static void e1000_class_init(ObjectClass *klass, void *data)
> @@ -1598,7 +1588,6 @@ static void e1000_class_init(ObjectClass *klass, void *data)
>      k->device_id = info->device_id;
>      k->revision = info->revision;
>      e->phy_id2 = info->phy_id2;
> -    e->is_8257xx = info->is_8257xx;
>      k->class_id = PCI_CLASS_NETWORK_ETHERNET;
>      set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
>      dc->desc = "Intel Gigabit Ethernet";
> @@ -1634,13 +1623,6 @@ static const E1000Info e1000_devices[] = {
>          .revision  = 0x03,
>          .phy_id2   = E1000_PHY_ID2_8254xx_DEFAULT,
>      },
> -    {
> -        .name      = "e1000-82573l",
> -        .device_id = E1000_DEV_ID_82573L,
> -        .revision  = 0x03,
> -        .phy_id2   = E1000_PHY_ID2_82573x,
> -        .is_8257xx = true,
> -    },
>  };
>
>  static const TypeInfo e1000_default_info = {
> diff --git a/tests/e1000-test.c b/tests/e1000-test.c
> index 53c41f8..81f164d 100644
> --- a/tests/e1000-test.c
> +++ b/tests/e1000-test.c
> @@ -33,7 +33,6 @@ static const char *models[] = {
>      "e1000-82540em",
>      "e1000-82544gc",
>      "e1000-82545em",
> -    "e1000-82573l",
>  };
>
>  int main(int argc, char **argv)
> --
> 1.9.3
>
>
Stefan Hajnoczi June 2, 2014, 12:26 p.m. UTC | #2
On Sat, May 31, 2014 at 11:33:16PM -0400, Gabriel L. Somlo wrote:
> Currently, e1000 support is based on the manual for the 8254xx
> model series. 82573x models are documented in a separate manual
> (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf)
> and the 82573L device ID no longer works correctly on either Linux
> (3.14.*) or Windows 7.
> 
> This patch removes stale code claiming to support 82573L, cleaning
> up the code base for the remaining 8254xx model series.
> 
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
>  hw/net/e1000.c     | 18 ------------------
>  tests/e1000-test.c |  1 -
>  2 files changed, 19 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 4e208e3..3ae5b43 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -70,8 +70,6 @@  static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
 /*
  * HW models:
  *  E1000_DEV_ID_82540EM works with Windows, Linux, and OS X <= 10.8
- *  E1000_DEV_ID_82573L OK with windoze and Linux 2.6.22,
- *	appears to perform better than 82540EM, but breaks with Linux 2.6.18
  *  E1000_DEV_ID_82544GC_COPPER appears to work; not well tested
  *  E1000_DEV_ID_82545EM_COPPER works with Linux and OS X >= 10.6
  *  Others never tested
@@ -144,7 +142,6 @@  typedef struct E1000State_st {
 typedef struct E1000DeviceClass {
     PCIDeviceClass parent_class;
     uint16_t phy_id2;
-    bool is_8257xx;
 } E1000DeviceClass;
 
 #define TYPE_E1000_BASE "e1000-base"
@@ -271,15 +268,9 @@  static void
 set_interrupt_cause(E1000State *s, int index, uint32_t val)
 {
     PCIDevice *d = PCI_DEVICE(s);
-    E1000DeviceClass *edc = E1000_DEVICE_GET_CLASS(d);
     uint32_t pending_ints;
     uint32_t mit_delay;
 
-    if (val && edc->is_8257xx) {
-        /* hack only for 8257xx models */
-        val |= E1000_ICR_INT_ASSERTED;
-    }
-
     s->mac_reg[ICR] = val;
 
     /*
@@ -1581,7 +1572,6 @@  typedef struct E1000Info_st {
     uint16_t   device_id;
     uint8_t    revision;
     uint16_t   phy_id2;
-    bool       is_8257xx;
 } E1000Info;
 
 static void e1000_class_init(ObjectClass *klass, void *data)
@@ -1598,7 +1588,6 @@  static void e1000_class_init(ObjectClass *klass, void *data)
     k->device_id = info->device_id;
     k->revision = info->revision;
     e->phy_id2 = info->phy_id2;
-    e->is_8257xx = info->is_8257xx;
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
     dc->desc = "Intel Gigabit Ethernet";
@@ -1634,13 +1623,6 @@  static const E1000Info e1000_devices[] = {
         .revision  = 0x03,
         .phy_id2   = E1000_PHY_ID2_8254xx_DEFAULT,
     },
-    {
-        .name      = "e1000-82573l",
-        .device_id = E1000_DEV_ID_82573L,
-        .revision  = 0x03,
-        .phy_id2   = E1000_PHY_ID2_82573x,
-        .is_8257xx = true,
-    },
 };
 
 static const TypeInfo e1000_default_info = {
diff --git a/tests/e1000-test.c b/tests/e1000-test.c
index 53c41f8..81f164d 100644
--- a/tests/e1000-test.c
+++ b/tests/e1000-test.c
@@ -33,7 +33,6 @@  static const char *models[] = {
     "e1000-82540em",
     "e1000-82544gc",
     "e1000-82545em",
-    "e1000-82573l",
 };
 
 int main(int argc, char **argv)