Commit 8fce4731 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by David S. Miller

e1000: two workarounds were incomplete, fix them

1) 82544 does not need last_tx_tso workaround, it interferes with the 82544
workaround too
2) 82544 hang workaround was using the address of the page struct instead of
the physical address as its "workaround decider" not sure how that ever worked
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdd7549e
...@@ -2416,6 +2416,11 @@ enum latency_range { ...@@ -2416,6 +2416,11 @@ enum latency_range {
/** /**
* e1000_update_itr - update the dynamic ITR value based on statistics * e1000_update_itr - update the dynamic ITR value based on statistics
* @adapter: pointer to adapter
* @itr_setting: current adapter->itr
* @packets: the number of packets during this measurement interval
* @bytes: the number of bytes during this measurement interval
*
* Stores a new ITR value based on packets and byte * Stores a new ITR value based on packets and byte
* counts during the last interrupt. The advantage of per interrupt * counts during the last interrupt. The advantage of per interrupt
* computation is faster updates and more accurate ITR for the current * computation is faster updates and more accurate ITR for the current
...@@ -2425,10 +2430,6 @@ enum latency_range { ...@@ -2425,10 +2430,6 @@ enum latency_range {
* while increasing bulk throughput. * while increasing bulk throughput.
* this functionality is controlled by the InterruptThrottleRate module * this functionality is controlled by the InterruptThrottleRate module
* parameter (see e1000_param.c) * parameter (see e1000_param.c)
* @adapter: pointer to adapter
* @itr_setting: current adapter->itr
* @packets: the number of packets during this measurement interval
* @bytes: the number of bytes during this measurement interval
**/ **/
static unsigned int e1000_update_itr(struct e1000_adapter *adapter, static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
u16 itr_setting, int packets, int bytes) u16 itr_setting, int packets, int bytes)
...@@ -2770,8 +2771,9 @@ static int e1000_tx_map(struct e1000_adapter *adapter, ...@@ -2770,8 +2771,9 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
* Avoid terminating buffers within evenly-aligned * Avoid terminating buffers within evenly-aligned
* dwords. */ * dwords. */
if (unlikely(adapter->pcix_82544 && if (unlikely(adapter->pcix_82544 &&
!((unsigned long)(frag->page+offset+size-1) & 4) && !((unsigned long)(page_to_phys(frag->page) + offset
size > 4)) + size - 1) & 4) &&
size > 4))
size -= 4; size -= 4;
buffer_info->length = size; buffer_info->length = size;
...@@ -3042,7 +3044,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, ...@@ -3042,7 +3044,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
} }
if (likely(tso)) { if (likely(tso)) {
tx_ring->last_tx_tso = 1; if (likely(hw->mac_type != e1000_82544))
tx_ring->last_tx_tso = 1;
tx_flags |= E1000_TX_FLAGS_TSO; tx_flags |= E1000_TX_FLAGS_TSO;
} else if (likely(e1000_tx_csum(adapter, tx_ring, skb))) } else if (likely(e1000_tx_csum(adapter, tx_ring, skb)))
tx_flags |= E1000_TX_FLAGS_CSUM; tx_flags |= E1000_TX_FLAGS_CSUM;
......
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