Subject: [PATCH 05/11] rrunner: fix DMA sync_single length error

From: Stephen Hemminger <[email-masked]>
Date: Wed, 20 Jan 2010 12:45:04 -0800

The DMA api requires that the full mapping be sync'd when
copying frame. First found by Jarek on sky2.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/drivers/net/rrunner.c	2010-01-20 11:32:54.859390177 -0800
+++ b/drivers/net/rrunner.c	2010-01-20 11:37:40.431004646 -0800
@@ -971,7 +971,7 @@ static void rx_int(struct net_device *de
 				} else {
 					pci_dma_sync_single_for_cpu(rrpriv->pci_dev,
 								    desc->addr.addrlo,
-								    pkt_len,
+								    dev->mtu + HIPPI_HLEN,
 								    PCI_DMA_FROMDEVICE);
 
 					memcpy(skb_put(skb, pkt_len),
@@ -979,7 +979,7 @@ static void rx_int(struct net_device *de
 
 					pci_dma_sync_single_for_device(rrpriv->pci_dev,
 								       desc->addr.addrlo,
-								       pkt_len,
+								       dev->mtu + HIPPI_HLEN,
 								       PCI_DMA_FROMDEVICE);
 				}
 			}else{

--