summaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorNick Nunley2010-02-17 02:06:16 +0100
committerDavid S. Miller2010-02-17 22:21:39 +0100
commita77ff709dd30a263f8154b05a8514b46098b42ba (patch)
tree4579e2a6e9882bf1fcb98717a64231879ddf3641 /drivers/net/igb/igb_main.c
parentigb: change descriptor control thresholds (diff)
downloadkernel-qcow2-linux-a77ff709dd30a263f8154b05a8514b46098b42ba.tar.gz
kernel-qcow2-linux-a77ff709dd30a263f8154b05a8514b46098b42ba.tar.xz
kernel-qcow2-linux-a77ff709dd30a263f8154b05a8514b46098b42ba.zip
igb: update tx DMA mapping error handling
This updates the tx DMA mapping error handling code to resemble e1000e/ixgbe. Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@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/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ab7c5e97ed02..f588e49c65f1 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3647,14 +3647,12 @@ dma_error:
buffer_info->length = 0;
buffer_info->next_to_watch = 0;
buffer_info->mapped_as_page = false;
- count--;
/* clear timestamp and dma mappings for remaining portion of packet */
- while (count >= 0) {
- count--;
+ while (count--) {
+ if (i == 0)
+ i = tx_ring->count;
i--;
- if (i < 0)
- i += tx_ring->count;
buffer_info = &tx_ring->buffer_info[i];
igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
}