e1000e: do not disable receiver on 82574/82583
Bruce Allan [Fri, 22 Jul 2011 06:21:35 +0000 (06:21 +0000)]
Due to a hardware erratum, the receiver on 82574 and 82583 should not be
stopped once it has been started.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

drivers/net/e1000e/82571.c
drivers/net/e1000e/e1000.h
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/netdev.c

index 480f259..536b3a5 100644 (file)
@@ -2085,7 +2085,8 @@ struct e1000_info e1000_82574_info = {
                                  | FLAG_HAS_AMT
                                  | FLAG_HAS_CTRLEXT_ON_LOAD,
        .flags2                   = FLAG2_CHECK_PHY_HANG
-                                 | FLAG2_DISABLE_ASPM_L0S,
+                                 | FLAG2_DISABLE_ASPM_L0S
+                                 | FLAG2_NO_DISABLE_RX,
        .pba                    = 32,
        .max_hw_frame_size      = DEFAULT_JUMBO,
        .get_variants           = e1000_get_variants_82571,
@@ -2104,7 +2105,8 @@ struct e1000_info e1000_82583_info = {
                                  | FLAG_HAS_AMT
                                  | FLAG_HAS_JUMBO_FRAMES
                                  | FLAG_HAS_CTRLEXT_ON_LOAD,
-       .flags2                 = FLAG2_DISABLE_ASPM_L0S,
+       .flags2                 = FLAG2_DISABLE_ASPM_L0S
+                                 | FLAG2_NO_DISABLE_RX,
        .pba                    = 32,
        .max_hw_frame_size      = DEFAULT_JUMBO,
        .get_variants           = e1000_get_variants_82571,
index 638d175..35916f4 100644 (file)
@@ -453,6 +453,7 @@ struct e1000_info {
 #define FLAG2_DISABLE_ASPM_L0S            (1 << 7)
 #define FLAG2_DISABLE_AIM                 (1 << 8)
 #define FLAG2_CHECK_PHY_HANG              (1 << 9)
+#define FLAG2_NO_DISABLE_RX               (1 << 10)
 
 #define E1000_RX_DESC_PS(R, i)     \
        (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
index 06d88f3..6a0526a 100644 (file)
@@ -1206,7 +1206,8 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
        rx_ring->next_to_clean = 0;
 
        rctl = er32(RCTL);
-       ew32(RCTL, rctl & ~E1000_RCTL_EN);
+       if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
+               ew32(RCTL, rctl & ~E1000_RCTL_EN);
        ew32(RDBAL, ((u64) rx_ring->dma & 0xFFFFFFFF));
        ew32(RDBAH, ((u64) rx_ring->dma >> 32));
        ew32(RDLEN, rx_ring->size);
index ab4be80..c0406b1 100644 (file)
@@ -2915,7 +2915,8 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
 
        /* disable receives while setting up the descriptors */
        rctl = er32(RCTL);
-       ew32(RCTL, rctl & ~E1000_RCTL_EN);
+       if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
+               ew32(RCTL, rctl & ~E1000_RCTL_EN);
        e1e_flush();
        usleep_range(10000, 20000);
 
@@ -3394,7 +3395,8 @@ void e1000e_down(struct e1000_adapter *adapter)
 
        /* disable receives in the hardware */
        rctl = er32(RCTL);
-       ew32(RCTL, rctl & ~E1000_RCTL_EN);
+       if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
+               ew32(RCTL, rctl & ~E1000_RCTL_EN);
        /* flush and sleep below */
 
        netif_stop_queue(netdev);
@@ -3403,6 +3405,7 @@ void e1000e_down(struct e1000_adapter *adapter)
        tctl = er32(TCTL);
        tctl &= ~E1000_TCTL_EN;
        ew32(TCTL, tctl);
+
        /* flush both disables and wait for them to finish */
        e1e_flush();
        usleep_range(10000, 20000);