Commit e47851f1 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

skge: dma_sync the whole receive buffer

The DMA sync should sync the whole receive buffer, not just
part of it. Fixes log messages dma_sync_check.
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58ad436f
...@@ -3077,11 +3077,13 @@ static struct sk_buff *skge_rx_get(struct net_device *dev, ...@@ -3077,11 +3077,13 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
pci_dma_sync_single_for_cpu(skge->hw->pdev, pci_dma_sync_single_for_cpu(skge->hw->pdev,
dma_unmap_addr(e, mapaddr), 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); skb_copy_from_linear_data(e->skb, skb->data, len);
pci_dma_sync_single_for_device(skge->hw->pdev, pci_dma_sync_single_for_device(skge->hw->pdev,
dma_unmap_addr(e, mapaddr), 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); skge_rx_reuse(e, skge->rx_buf_size);
} else { } else {
struct sk_buff *nskb; struct sk_buff *nskb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment