netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Nicholas Nunley <nicholasx.d.nunley@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 18/18] igb: update tx DMA mapping error handling
Date: Wed, 17 Feb 2010 03:06:16 -0800	[thread overview]
Message-ID: <20100217110614.17723.84160.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100217105953.17723.36633.stgit@localhost.localdomain>

From: Nick Nunley <nicholasx.d.nunley@intel.com>

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>
---

 drivers/net/igb/igb_main.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ab7c5e9..f588e49 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);
 	}


  parent reply	other threads:[~2010-02-17 11:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 11:00 [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 02/18] igb: add support for wake-on-link Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 03/18] igb: Report link status in ethtool when interface is down Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 04/18] igb: ignore EEPROM APME check when shutting down serdes link Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 05/18] igb: Power down link when interface is down Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 06/18] igb: call pci_save_state after pci_restore_state Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 07/18] igb: Allocate rings seperately instead of as a block Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 08/18] igb: remove adaptive IFS from driver Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 09/18] igb: cap interrupts at 20K per queue when in itr mode 3 Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 10/18] igb: only support SRRCTL_DROP_EN when using multiple queues Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 11/18] igb: only read phy specific stats if in internal phy mode Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 12/18] igb: inline igb_maybe_stop_tx Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 13/18] igb: move gso_segs into buffer_info structure Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 14/18] igb: minor type cleanups Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 15/18] igb: remove unused vmolr value Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 16/18] igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 17/18] igb: change descriptor control thresholds Jeff Kirsher
2010-02-17 11:06 ` Jeff Kirsher [this message]
2010-02-17 21:51 ` [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100217110614.17723.84160.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicholasx.d.nunley@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).