From: Greg Kroah-Hartman Date: Mon, 25 Jan 2010 20:42:48 +0000 (-0800) Subject: another .27 patch X-Git-Tag: v2.6.32.7~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd0958a2d056d34e4842defbe5a088ad1fd4ecf7;p=thirdparty%2Fkernel%2Fstable-queue.git another .27 patch --- diff --git a/queue-2.6.27/series b/queue-2.6.27/series index f3258bd56e8..b78891860cd 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -7,3 +7,4 @@ tty-fix-race-in-tty_fasync.patch usb-add-missing-delay-during-remote-wakeup.patch usb-ehci-fix-handling-of-unusual-interrupt-intervals.patch usb-ehci-uhci-fix-race-between-root-hub-suspend-and-port-resume.patch +sfc-fix-dma-mapping-cleanup-in-case-of-an-error-in-tso.patch diff --git a/queue-2.6.27/sfc-fix-dma-mapping-cleanup-in-case-of-an-error-in-tso.patch b/queue-2.6.27/sfc-fix-dma-mapping-cleanup-in-case-of-an-error-in-tso.patch new file mode 100644 index 00000000000..5a73f041a71 --- /dev/null +++ b/queue-2.6.27/sfc-fix-dma-mapping-cleanup-in-case-of-an-error-in-tso.patch @@ -0,0 +1,40 @@ +From a7ebd27a13757248863cd61e541af7fa9e7727ee Mon Sep 17 00:00:00 2001 +From: Neil Turton +Date: Wed, 23 Dec 2009 13:47:13 +0000 +Subject: sfc: Fix DMA mapping cleanup in case of an error in TSO + +From: Neil Turton + +commit a7ebd27a13757248863cd61e541af7fa9e7727ee upstream. + +We need buffer->len to remain valid to work out the correct address to +be unmapped. We therefore need to clear buffer->len after the unmap +operation. + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/sfc/tx.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/sfc/tx.c ++++ b/drivers/net/sfc/tx.c +@@ -813,14 +813,14 @@ static void efx_enqueue_unwind(struct ef + tx_queue->efx->type->txd_ring_mask]; + efx_tsoh_free(tx_queue, buffer); + EFX_BUG_ON_PARANOID(buffer->skb); +- buffer->len = 0; +- buffer->continuation = 1; + if (buffer->unmap_len) { + pci_unmap_page(tx_queue->efx->pci_dev, + buffer->unmap_addr, + buffer->unmap_len, PCI_DMA_TODEVICE); + buffer->unmap_len = 0; + } ++ buffer->len = 0; ++ buffer->continuation = 1; + } + } +