From patchwork Tue Jan 12 20:52:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Duyck, Alexander H" X-Patchwork-Id: 42770 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 998431007D4 for ; Wed, 13 Jan 2010 07:52:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921Ab0ALUwe (ORCPT ); Tue, 12 Jan 2010 15:52:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752901Ab0ALUwd (ORCPT ); Tue, 12 Jan 2010 15:52:33 -0500 Received: from mga03.intel.com ([143.182.124.21]:8429 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946Ab0ALUwd convert rfc822-to-8bit (ORCPT ); Tue, 12 Jan 2010 15:52:33 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 12 Jan 2010 12:52:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,316,1257148800"; d="scan'208";a="231981711" Received: from orsmsx602.amr.corp.intel.com ([10.22.226.211]) by azsmga001.ch.intel.com with ESMTP; 12 Jan 2010 12:52:32 -0800 Received: from orsmsx501.amr.corp.intel.com ([10.22.226.209]) by orsmsx602.amr.corp.intel.com ([10.22.226.211]) with mapi; Tue, 12 Jan 2010 12:52:32 -0800 From: "Duyck, Alexander H" To: Anton Blanchard , "Kirsher, Jeffrey T" , "Brandeburg, Jesse" , "Allan, Bruce W" , "Waskiewicz Jr, Peter P" , "Ronciak, John" , "Skidmore, Donald C" , "Zou, Yi" CC: "e1000-devel@lists.sourceforge.net" , "netdev@vger.kernel.org" Date: Tue, 12 Jan 2010 12:52:31 -0800 Subject: RE: [PATCH] ixgbe: Fix ixgbe_tx_map error path Thread-Topic: [PATCH] ixgbe: Fix ixgbe_tx_map error path Thread-Index: AcqTdv9NrFcPnyyyQE2fQN9fsE/5mQAUfEdw Message-ID: <80769D7B14936844A23C0C43D9FBCF0F12D49A2CE7@orsmsx501.amr.corp.intel.com> References: <20100112110135.GK12666@kryten> In-Reply-To: <20100112110135.GK12666@kryten> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Actually it looks like the bug for ixgbe is in the while (count >= 0) check. It should be just while (count > 0) insead. It also appears there is an issue I may have introduced in igb as well. I will go back through the drivers and see about submitting some patches to address these issues. Thanks, Alex -----Original Message----- From: Anton Blanchard [mailto:anton@samba.org] Sent: Tuesday, January 12, 2010 3:02 AM To: Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; Waskiewicz Jr, Peter P; Ronciak, John; Skidmore, Donald C; Zou, Yi; Duyck, Alexander H Cc: e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org Subject: [PATCH] ixgbe: Fix ixgbe_tx_map error path Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove skb_dma_map/unmap calls from driver) looks to have introduced a bug in ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards through count until it becomes -1 and return that. The caller of ixgbe_tx_map expects 0 on error, so return that instead. --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 1a2ea62..af660ba 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -5174,7 +5174,7 @@ dma_error: ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); } - return count; + return 0; } static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,