diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-01-23 04:35:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 04:35:00 -0500 |
commit | 8581145f39c39b00cd1b6a2dcb4ce5bf7d8d6070 (patch) | |
tree | 61283610e6f7c92754df71fe7b8a93888331ac81 /drivers/net/igb | |
parent | de4fc07aff770743b2c3e3ee30a23a691450a4f6 (diff) |
igb/igbvf: cleanup exception handling in tx_map_adv
After removing the skb_dma_map/unmap calls the exception handling in
igb_tx_map_adv is not correct. The issue is that the count value was not
being correctly handled so as a result we were not rewinding the ring as
back as we should have been.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 933c64ff2465..2ca173453b66 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -3584,6 +3584,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3584 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 3584 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
3585 | struct skb_frag_struct *frag; | 3585 | struct skb_frag_struct *frag; |
3586 | 3586 | ||
3587 | count++; | ||
3587 | i++; | 3588 | i++; |
3588 | if (i == tx_ring->count) | 3589 | if (i == tx_ring->count) |
3589 | i = 0; | 3590 | i = 0; |
@@ -3605,7 +3606,6 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3605 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 3606 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
3606 | goto dma_error; | 3607 | goto dma_error; |
3607 | 3608 | ||
3608 | count++; | ||
3609 | } | 3609 | } |
3610 | 3610 | ||
3611 | tx_ring->buffer_info[i].skb = skb; | 3611 | tx_ring->buffer_info[i].skb = skb; |