aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/tx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:46:36 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:44 -0400
commit5988b63a53e120a9db4439d4512f4c1b17e7170e (patch)
treecad229434f5f3f97205206de09ca6cb442b6da77 /drivers/net/sfc/tx.c
parentb9aafb0e91a079ff9438ce3c532ea46d4cd2f0fc (diff)
sfc: Don't leak PCI DMA maps in the TSO code when the queue fills up
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/tx.c')
-rw-r--r--drivers/net/sfc/tx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index e5e0bab313eb..0452ea6937ab 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -1096,6 +1096,11 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue,
1096 efx_stop_queue(tx_queue->efx); 1096 efx_stop_queue(tx_queue->efx);
1097 1097
1098 unwind: 1098 unwind:
1099 /* Free the DMA mapping we were in the process of writing out */
1100 if (state.ifc.unmap_len)
1101 pci_unmap_page(tx_queue->efx->pci_dev, state.ifc.unmap_addr,
1102 state.ifc.unmap_len, PCI_DMA_TODEVICE);
1103
1099 efx_enqueue_unwind(tx_queue); 1104 efx_enqueue_unwind(tx_queue);
1100 return rc2; 1105 return rc2;
1101} 1106}