diff options
-rw-r--r-- | drivers/net/fec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index cab07eced06e..a17dc6af30c3 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -356,8 +356,8 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
356 | /* Push the data cache so the CPM does not get stale memory | 356 | /* Push the data cache so the CPM does not get stale memory |
357 | * data. | 357 | * data. |
358 | */ | 358 | */ |
359 | flush_dcache_range((unsigned long)skb->data, | 359 | dma_sync_single(NULL, bdp->cbd_bufaddr, |
360 | (unsigned long)skb->data + skb->len); | 360 | bdp->cbd_datlen, DMA_TO_DEVICE); |
361 | 361 | ||
362 | /* Send it on its way. Tell FEC it's ready, interrupt when done, | 362 | /* Send it on its way. Tell FEC it's ready, interrupt when done, |
363 | * it's the last BD of the frame, and to put the CRC on the end. | 363 | * it's the last BD of the frame, and to put the CRC on the end. |
@@ -630,6 +630,9 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { | |||
630 | dev->stats.rx_bytes += pkt_len; | 630 | dev->stats.rx_bytes += pkt_len; |
631 | data = (__u8*)__va(bdp->cbd_bufaddr); | 631 | data = (__u8*)__va(bdp->cbd_bufaddr); |
632 | 632 | ||
633 | dma_sync_single(NULL, (unsigned long)__pa(data), | ||
634 | pkt_len - 4, DMA_FROM_DEVICE); | ||
635 | |||
633 | /* This does 16 byte alignment, exactly what we need. | 636 | /* This does 16 byte alignment, exactly what we need. |
634 | * The packet length includes FCS, but we don't want to | 637 | * The packet length includes FCS, but we don't want to |
635 | * include that when passing upstream as it messes up | 638 | * include that when passing upstream as it messes up |