Commit 18eec695 authored by Olof Johansson's avatar Olof Johansson Committed by David S. Miller

pasemi_mac: fix bug in receive buffer dma mapping

pasemi_mac: fix bug in receive buffer dma mapping

skb->len isn't actually set to the size of the allocated skb, so don't
try to use it when figuring out how much to map.

(This hasn't surfaced as a real bug because we effectively disable
translation for the interface, but it still needs fixing for the future)
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 69c29d89
...@@ -396,7 +396,7 @@ static void pasemi_mac_replenish_rx_ring(struct net_device *dev, int limit) ...@@ -396,7 +396,7 @@ static void pasemi_mac_replenish_rx_ring(struct net_device *dev, int limit)
if (unlikely(!skb)) if (unlikely(!skb))
break; break;
dma = pci_map_single(mac->dma_pdev, skb->data, skb->len, dma = pci_map_single(mac->dma_pdev, skb->data, BUF_SIZE,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
if (unlikely(dma_mapping_error(dma))) { if (unlikely(dma_mapping_error(dma))) {
......
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