diff options
author | Florian Westphal <fw@strlen.de> | 2015-01-07 06:40:33 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-01-22 21:10:23 -0500 |
commit | 8a4d0b93c142a53c369998303d2114b5beeca7af (patch) | |
tree | 6dae43d0e6160a59ce0419be3f844bfcfad43eb1 | |
parent | 6ddbc4cf1f4d5a3a58b4223c80881f299dae3774 (diff) |
net: e1000: support txtd update delay via xmit_more
Don't update Tx tail descriptor if we queue hasn't been stopped and
we know at least one more skb will be sent right away.
Signed-off-by: Florian Westphal <fw@strlen.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 9242982db3e0..7f997d36948f 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -2977,7 +2977,6 @@ static void e1000_tx_queue(struct e1000_adapter *adapter, | |||
2977 | struct e1000_tx_ring *tx_ring, int tx_flags, | 2977 | struct e1000_tx_ring *tx_ring, int tx_flags, |
2978 | int count) | 2978 | int count) |
2979 | { | 2979 | { |
2980 | struct e1000_hw *hw = &adapter->hw; | ||
2981 | struct e1000_tx_desc *tx_desc = NULL; | 2980 | struct e1000_tx_desc *tx_desc = NULL; |
2982 | struct e1000_tx_buffer *buffer_info; | 2981 | struct e1000_tx_buffer *buffer_info; |
2983 | u32 txd_upper = 0, txd_lower = E1000_TXD_CMD_IFCS; | 2982 | u32 txd_upper = 0, txd_lower = E1000_TXD_CMD_IFCS; |
@@ -3031,11 +3030,6 @@ static void e1000_tx_queue(struct e1000_adapter *adapter, | |||
3031 | wmb(); | 3030 | wmb(); |
3032 | 3031 | ||
3033 | tx_ring->next_to_use = i; | 3032 | tx_ring->next_to_use = i; |
3034 | writel(i, hw->hw_addr + tx_ring->tdt); | ||
3035 | /* we need this if more than one processor can write to our tail | ||
3036 | * at a time, it synchronizes IO on IA64/Altix systems | ||
3037 | */ | ||
3038 | mmiowb(); | ||
3039 | } | 3033 | } |
3040 | 3034 | ||
3041 | /* 82547 workaround to avoid controller hang in half-duplex environment. | 3035 | /* 82547 workaround to avoid controller hang in half-duplex environment. |
@@ -3264,6 +3258,15 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, | |||
3264 | /* Make sure there is space in the ring for the next send. */ | 3258 | /* Make sure there is space in the ring for the next send. */ |
3265 | e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); | 3259 | e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); |
3266 | 3260 | ||
3261 | if (!skb->xmit_more || | ||
3262 | netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) { | ||
3263 | writel(tx_ring->next_to_use, hw->hw_addr + tx_ring->tdt); | ||
3264 | /* we need this if more than one processor can write to | ||
3265 | * our tail at a time, it synchronizes IO on IA64/Altix | ||
3266 | * systems | ||
3267 | */ | ||
3268 | mmiowb(); | ||
3269 | } | ||
3267 | } else { | 3270 | } else { |
3268 | dev_kfree_skb_any(skb); | 3271 | dev_kfree_skb_any(skb); |
3269 | tx_ring->buffer_info[first].time_stamp = 0; | 3272 | tx_ring->buffer_info[first].time_stamp = 0; |