diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2006-11-01 11:47:53 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:12:00 -0500 |
commit | a9ebadd640927ac6529d904b4131b17e8019d199 (patch) | |
tree | 0e818b591ac79057a4155a6814bd2cc29a866807 | |
parent | 996695de21b9b301ebb32379e2950fc2142df3a7 (diff) |
e1000: Remove unneeded and unwanted memsets
This memsetting was added in a paranoid rage debugging TX hangs, but
are no longer of importance. We can beef up the performance quite a
bit removing them. Make sure to fill in next_to_watch to allow this.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 44ba52229c73..9d82bbb1a826 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1993,10 +1993,13 @@ e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter, | |||
1993 | buffer_info->dma, | 1993 | buffer_info->dma, |
1994 | buffer_info->length, | 1994 | buffer_info->length, |
1995 | PCI_DMA_TODEVICE); | 1995 | PCI_DMA_TODEVICE); |
1996 | buffer_info->dma = 0; | ||
1996 | } | 1997 | } |
1997 | if (buffer_info->skb) | 1998 | if (buffer_info->skb) { |
1998 | dev_kfree_skb_any(buffer_info->skb); | 1999 | dev_kfree_skb_any(buffer_info->skb); |
1999 | memset(buffer_info, 0, sizeof(struct e1000_buffer)); | 2000 | buffer_info->skb = NULL; |
2001 | } | ||
2002 | /* buffer_info must be completely set up in the transmit path */ | ||
2000 | } | 2003 | } |
2001 | 2004 | ||
2002 | /** | 2005 | /** |
@@ -2661,6 +2664,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2661 | context_desc->cmd_and_length = cpu_to_le32(cmd_length); | 2664 | context_desc->cmd_and_length = cpu_to_le32(cmd_length); |
2662 | 2665 | ||
2663 | buffer_info->time_stamp = jiffies; | 2666 | buffer_info->time_stamp = jiffies; |
2667 | buffer_info->next_to_watch = i; | ||
2664 | 2668 | ||
2665 | if (++i == tx_ring->count) i = 0; | 2669 | if (++i == tx_ring->count) i = 0; |
2666 | tx_ring->next_to_use = i; | 2670 | tx_ring->next_to_use = i; |
@@ -2695,6 +2699,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2695 | context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT); | 2699 | context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT); |
2696 | 2700 | ||
2697 | buffer_info->time_stamp = jiffies; | 2701 | buffer_info->time_stamp = jiffies; |
2702 | buffer_info->next_to_watch = i; | ||
2698 | 2703 | ||
2699 | if (unlikely(++i == tx_ring->count)) i = 0; | 2704 | if (unlikely(++i == tx_ring->count)) i = 0; |
2700 | tx_ring->next_to_use = i; | 2705 | tx_ring->next_to_use = i; |
@@ -2763,6 +2768,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2763 | size, | 2768 | size, |
2764 | PCI_DMA_TODEVICE); | 2769 | PCI_DMA_TODEVICE); |
2765 | buffer_info->time_stamp = jiffies; | 2770 | buffer_info->time_stamp = jiffies; |
2771 | buffer_info->next_to_watch = i; | ||
2766 | 2772 | ||
2767 | len -= size; | 2773 | len -= size; |
2768 | offset += size; | 2774 | offset += size; |
@@ -2802,6 +2808,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2802 | size, | 2808 | size, |
2803 | PCI_DMA_TODEVICE); | 2809 | PCI_DMA_TODEVICE); |
2804 | buffer_info->time_stamp = jiffies; | 2810 | buffer_info->time_stamp = jiffies; |
2811 | buffer_info->next_to_watch = i; | ||
2805 | 2812 | ||
2806 | len -= size; | 2813 | len -= size; |
2807 | offset += size; | 2814 | offset += size; |
@@ -3620,7 +3627,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, | |||
3620 | cleaned = (i == eop); | 3627 | cleaned = (i == eop); |
3621 | 3628 | ||
3622 | e1000_unmap_and_free_tx_resource(adapter, buffer_info); | 3629 | e1000_unmap_and_free_tx_resource(adapter, buffer_info); |
3623 | memset(tx_desc, 0, sizeof(struct e1000_tx_desc)); | 3630 | tx_desc->upper.data = 0; |
3624 | 3631 | ||
3625 | if (unlikely(++i == tx_ring->count)) i = 0; | 3632 | if (unlikely(++i == tx_ring->count)) i = 0; |
3626 | } | 3633 | } |