* [PATCH] ixgbe: Fix ixgbe_tx_map error path @ 2010-01-12 11:01 Anton Blanchard 2010-01-12 20:52 ` Duyck, Alexander H 0 siblings, 1 reply; 3+ messages in thread From: Anton Blanchard @ 2010-01-12 11:01 UTC (permalink / raw) To: Jeff Kirsher, Jesse Brandeburg, Bruce Allan, PJ Waskiewicz, Joh Cc: e1000-devel, netdev 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. --- 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, ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] ixgbe: Fix ixgbe_tx_map error path 2010-01-12 11:01 [PATCH] ixgbe: Fix ixgbe_tx_map error path Anton Blanchard @ 2010-01-12 20:52 ` Duyck, Alexander H 2010-01-12 23:27 ` Duyck, Alexander H 0 siblings, 1 reply; 3+ messages in thread From: Duyck, Alexander H @ 2010-01-12 20:52 UTC (permalink / raw) To: Anton Blanchard, Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W, " Cc: e1000-devel@lists.sourceforge.net, 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. --- 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, ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] ixgbe: Fix ixgbe_tx_map error path 2010-01-12 20:52 ` Duyck, Alexander H @ 2010-01-12 23:27 ` Duyck, Alexander H 0 siblings, 0 replies; 3+ messages in thread From: Duyck, Alexander H @ 2010-01-12 23:27 UTC (permalink / raw) To: Duyck, Alexander H, Anton Blanchard, Kirsher, Jeffrey T, Brandeburg, Jesse Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org Duyck, Alexander H wrote: > 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 It looks like we actually have some other patches in place that are addressing the count >= 0 issue. This patch addresses the remaining return value of -1 issues for ixgbe. I think we should probably pull it into Jeff's tree for testing, and I will generate a separate patch for the igb 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. > > --- > > 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, ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-12 23:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-12 11:01 [PATCH] ixgbe: Fix ixgbe_tx_map error path Anton Blanchard 2010-01-12 20:52 ` Duyck, Alexander H 2010-01-12 23:27 ` Duyck, Alexander H
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox