vxge: convert to SKB paged frag API.
authorIan Campbell <ian.campbell@citrix.com>
Wed, 5 Oct 2011 21:35:34 +0000 (17:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Oct 2011 21:35:34 +0000 (17:35 -0400)
[ Use DMA_TO_DEVICE and dma_mapping_error() -DaveM ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index ef1ba204bc59c68b8095dd648ca51cea06abc3c5..a66f8fc0401e32329aae82fcfac022894e5f017f 100644 (file)
@@ -923,11 +923,11 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
                if (!frag->size)
                        continue;
 
-               dma_pointer = (u64) pci_map_page(fifo->pdev, frag->page,
-                               frag->page_offset, frag->size,
-                               PCI_DMA_TODEVICE);
+               dma_pointer = (u64)skb_frag_dma_map(&fifo->pdev->dev, frag,
+                                                   0, frag->size,
+                                                   DMA_TO_DEVICE);
 
-               if (unlikely(pci_dma_mapping_error(fifo->pdev, dma_pointer)))
+               if (unlikely(dma_mapping_error(&fifo->pdev->dev, dma_pointer)))
                        goto _exit2;
                vxge_debug_tx(VXGE_TRACE,
                        "%s: %s:%d frag = %d dma_pointer = 0x%llx",