diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-05 10:39:46 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-05 10:39:46 +0000 |
commit | 2507f5f0e9a233823cf0e763177fa288c94e3de4 (patch) | |
tree | cba41aa4c2fe483258a6e14ba4f92a531b1df799 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | |
parent | 39b8ede1e7d866cd1d82ef1babc53d2eacdb5a26 (diff) |
[ar71xx] ag71xx driver: don't use dma_cache_wback_inv
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13523 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c index 6793b4d72..16dc0297c 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c @@ -196,6 +196,9 @@ static int ag71xx_ring_rx_init(struct ag71xx *ag) break; } + dma_map_single(NULL, skb->data, AG71XX_RX_PKT_SIZE, + DMA_FROM_DEVICE); + skb->dev = ag->dev; skb_reserve(skb, AG71XX_RX_PKT_RESERVE); @@ -234,8 +237,12 @@ static int ag71xx_ring_rx_refill(struct ag71xx *ag) break; } + dma_map_single(NULL, skb->data, AG71XX_RX_PKT_SIZE, + DMA_FROM_DEVICE); + skb_reserve(skb, AG71XX_RX_PKT_RESERVE); skb->dev = ag->dev; + ring->buf[i].skb = skb; ring->descs[i].data = virt_to_phys(skb->data); } @@ -468,7 +475,7 @@ static int ag71xx_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) goto err_drop; } - dma_cache_wback_inv((unsigned long)skb->data, skb->len); + dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE); ring->buf[i].skb = skb; @@ -621,8 +628,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit) pktlen = ag71xx_desc_pktlen(desc); pktlen -= ETH_FCS_LEN; - /* TODO: move it into the refill function */ - dma_cache_wback_inv((unsigned long)skb->data, pktlen); skb_put(skb, pktlen); skb->dev = dev; |