Thread (19 messages) flat view 19 messages, 2 authors, 2007-10-03
STALE6930d

[PATCH] [2/11] pasemi_mac: fix bug in receive buffer dma mapping

From: Olof Johansson <hidden>
Date: 2007-10-02 21:21:12
Also in: linuxppc-dev

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 <redacted>

Index: k.org/drivers/net/pasemi_mac.c
===================================================================
--- k.org.orig/drivers/net/pasemi_mac.c
+++ k.org/drivers/net/pasemi_mac.c
@@ -396,7 +396,7 @@ static void pasemi_mac_replenish_rx_ring
 		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))) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help