Commit 7f99ae63 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

e1000e: do not disable receiver on 82574/82583

Due to a hardware erratum, the receiver on 82574 and 82583 should not be
stopped once it has been started.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent c407bee8
...@@ -2085,7 +2085,8 @@ struct e1000_info e1000_82574_info = { ...@@ -2085,7 +2085,8 @@ struct e1000_info e1000_82574_info = {
| FLAG_HAS_AMT | FLAG_HAS_AMT
| FLAG_HAS_CTRLEXT_ON_LOAD, | FLAG_HAS_CTRLEXT_ON_LOAD,
.flags2 = FLAG2_CHECK_PHY_HANG .flags2 = FLAG2_CHECK_PHY_HANG
| FLAG2_DISABLE_ASPM_L0S, | FLAG2_DISABLE_ASPM_L0S
| FLAG2_NO_DISABLE_RX,
.pba = 32, .pba = 32,
.max_hw_frame_size = DEFAULT_JUMBO, .max_hw_frame_size = DEFAULT_JUMBO,
.get_variants = e1000_get_variants_82571, .get_variants = e1000_get_variants_82571,
...@@ -2104,7 +2105,8 @@ struct e1000_info e1000_82583_info = { ...@@ -2104,7 +2105,8 @@ struct e1000_info e1000_82583_info = {
| FLAG_HAS_AMT | FLAG_HAS_AMT
| FLAG_HAS_JUMBO_FRAMES | FLAG_HAS_JUMBO_FRAMES
| FLAG_HAS_CTRLEXT_ON_LOAD, | FLAG_HAS_CTRLEXT_ON_LOAD,
.flags2 = FLAG2_DISABLE_ASPM_L0S, .flags2 = FLAG2_DISABLE_ASPM_L0S
| FLAG2_NO_DISABLE_RX,
.pba = 32, .pba = 32,
.max_hw_frame_size = DEFAULT_JUMBO, .max_hw_frame_size = DEFAULT_JUMBO,
.get_variants = e1000_get_variants_82571, .get_variants = e1000_get_variants_82571,
......
...@@ -453,6 +453,7 @@ struct e1000_info { ...@@ -453,6 +453,7 @@ struct e1000_info {
#define FLAG2_DISABLE_ASPM_L0S (1 << 7) #define FLAG2_DISABLE_ASPM_L0S (1 << 7)
#define FLAG2_DISABLE_AIM (1 << 8) #define FLAG2_DISABLE_AIM (1 << 8)
#define FLAG2_CHECK_PHY_HANG (1 << 9) #define FLAG2_CHECK_PHY_HANG (1 << 9)
#define FLAG2_NO_DISABLE_RX (1 << 10)
#define E1000_RX_DESC_PS(R, i) \ #define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
......
...@@ -1206,6 +1206,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter) ...@@ -1206,6 +1206,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
rx_ring->next_to_clean = 0; rx_ring->next_to_clean = 0;
rctl = er32(RCTL); rctl = er32(RCTL);
if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
ew32(RCTL, rctl & ~E1000_RCTL_EN); ew32(RCTL, rctl & ~E1000_RCTL_EN);
ew32(RDBAL, ((u64) rx_ring->dma & 0xFFFFFFFF)); ew32(RDBAL, ((u64) rx_ring->dma & 0xFFFFFFFF));
ew32(RDBAH, ((u64) rx_ring->dma >> 32)); ew32(RDBAH, ((u64) rx_ring->dma >> 32));
......
...@@ -2915,6 +2915,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) ...@@ -2915,6 +2915,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
/* disable receives while setting up the descriptors */ /* disable receives while setting up the descriptors */
rctl = er32(RCTL); rctl = er32(RCTL);
if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
ew32(RCTL, rctl & ~E1000_RCTL_EN); ew32(RCTL, rctl & ~E1000_RCTL_EN);
e1e_flush(); e1e_flush();
usleep_range(10000, 20000); usleep_range(10000, 20000);
...@@ -3394,6 +3395,7 @@ void e1000e_down(struct e1000_adapter *adapter) ...@@ -3394,6 +3395,7 @@ void e1000e_down(struct e1000_adapter *adapter)
/* disable receives in the hardware */ /* disable receives in the hardware */
rctl = er32(RCTL); rctl = er32(RCTL);
if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
ew32(RCTL, rctl & ~E1000_RCTL_EN); ew32(RCTL, rctl & ~E1000_RCTL_EN);
/* flush and sleep below */ /* flush and sleep below */
...@@ -3403,6 +3405,7 @@ void e1000e_down(struct e1000_adapter *adapter) ...@@ -3403,6 +3405,7 @@ void e1000e_down(struct e1000_adapter *adapter)
tctl = er32(TCTL); tctl = er32(TCTL);
tctl &= ~E1000_TCTL_EN; tctl &= ~E1000_TCTL_EN;
ew32(TCTL, tctl); ew32(TCTL, tctl);
/* flush both disables and wait for them to finish */ /* flush both disables and wait for them to finish */
e1e_flush(); e1e_flush();
usleep_range(10000, 20000); usleep_range(10000, 20000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment