--- /dev/null
+From a7ebd27a13757248863cd61e541af7fa9e7727ee Mon Sep 17 00:00:00 2001
+From: Neil Turton <nturton@solarflare.com>
+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 <nturton@solarflare.com>
+
+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 <bhutchings@solarflare.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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;
+ }
+ }
+