igb: update tx DMA mapping error handling
authorNick Nunley <nicholasx.d.nunley@intel.com>
Wed, 17 Feb 2010 01:06:16 +0000 (01:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2010 21:21:39 +0000 (13:21 -0800)
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>
drivers/net/igb/igb_main.c

index ab7c5e97ed028d3f828f4358e4cd02c74ae6035b..f588e49c65f13a70e816418ac1b6d9aedd760e5f 100644 (file)
@@ -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);
        }
This page took 0.036257 seconds and 5 git commands to generate.