skge: dma_sync the whole receive buffer
authorstephen hemminger <stephen@networkplumber.org>
Sat, 10 Aug 2013 22:02:07 +0000 (15:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Aug 2013 22:09:06 +0000 (15:09 -0700)
The DMA sync should sync the whole receive buffer, not just
part of it. Fixes log messages dma_sync_check.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/skge.c

index 3f78336bab2c8e03b634e3ad7d44ef43df0c5b2d..ef94a591f9e550ed31d654c2cc1fa2ba7bc1bef9 100644 (file)
@@ -3077,11 +3077,13 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
 
                pci_dma_sync_single_for_cpu(skge->hw->pdev,
                                            dma_unmap_addr(e, mapaddr),
-                                           len, PCI_DMA_FROMDEVICE);
+                                           dma_unmap_len(e, maplen),
+                                           PCI_DMA_FROMDEVICE);
                skb_copy_from_linear_data(e->skb, skb->data, len);
                pci_dma_sync_single_for_device(skge->hw->pdev,
                                               dma_unmap_addr(e, mapaddr),
-                                              len, PCI_DMA_FROMDEVICE);
+                                              dma_unmap_len(e, maplen),
+                                              PCI_DMA_FROMDEVICE);
                skge_rx_reuse(e, skge->rx_buf_size);
        } else {
                struct sk_buff *nskb;