]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pasemi_mac: fix bug in receive buffer dma mapping
authorOlof Johansson <olof@lixom.net>
Tue, 2 Oct 2007 21:25:14 +0000 (16:25 -0500)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:54:22 +0000 (16:54 -0700)
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: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/pasemi_mac.c

index b297a67d2fbee4b39ff8ccf65eece1c9b7b122d6..b2861e0df86c3631b81446c873c4853dacae5ebb 100644 (file)
@@ -396,7 +396,7 @@ static void pasemi_mac_replenish_rx_ring(struct net_device *dev, int limit)
                if (unlikely(!skb))
                        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);
 
                if (unlikely(dma_mapping_error(dma))) {