提交 e752991a 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册