summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-13 14:55:18 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-13 14:55:18 -0500
commite752991a2e6a1dc33271a6299d5c1c8688f35f95 (patch)
treeeb889a7f8fe0385f6ba73029cf888ebd2c8bb273
parent3b780bed3138c2a8061c218df7e321beec9a6ec9 (diff)
parent6e144419e4da11a9a4977c8d899d7247d94ca338 (diff)
Merge branch '3c59x-dma-fixes'
Neil Horman says: ==================== 3c59x: Fix dma map/unmap imbalances recent enhancements to libdma revealed a few minor bugs in 3c59x, in which dma ranges were mapped as singles and unmaped as pages, or vice versa. These patches fix those up. Tested by myself with success ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/3com/3c59x.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index 1c5f3b273e6a..79e1a0282163 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -2459,8 +2459,13 @@ boomerang_interrupt(int irq, void *dev_id)
struct sk_buff *skb = vp->tx_skbuff[entry];
#if DO_ZEROCOPY
int i;
- for (i=0; i<=skb_shinfo(skb)->nr_frags; i++)
- pci_unmap_single(VORTEX_PCI(vp),
+ pci_unmap_single(VORTEX_PCI(vp),
+ le32_to_cpu(vp->tx_ring[entry].frag[0].addr),
+ le32_to_cpu(vp->tx_ring[entry].frag[0].length),
+ PCI_DMA_TODEVICE);
+
+ for (i=1; i<=skb_shinfo(skb)->nr_frags; i++)
+ pci_unmap_page(VORTEX_PCI(vp),
le32_to_cpu(vp->tx_ring[entry].frag[i].addr),
le32_to_cpu(vp->tx_ring[entry].frag[i].length)&0xFFF,
PCI_DMA_TODEVICE);