summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-12-05 10:39:46 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-12-05 10:39:46 +0000
commit9afbc8dd6177d9dcbf391f64dedfb032a3915911 (patch)
tree50e04653550999cd586c1e2b5b6318ffa2e5109d /target/linux/ar71xx/files
parent17cc4d671cc48493503ea67098b2e2b9d1e5fc56 (diff)
downloadmtk-20170518-9afbc8dd6177d9dcbf391f64dedfb032a3915911.zip
mtk-20170518-9afbc8dd6177d9dcbf391f64dedfb032a3915911.tar.gz
mtk-20170518-9afbc8dd6177d9dcbf391f64dedfb032a3915911.tar.bz2
ag71xx driver: don't use dma_cache_wback_inv
SVN-Revision: 13523
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index ac2c871..40715c9 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -37,7 +37,7 @@
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
-#define AG71XX_DRV_VERSION "0.5.6"
+#define AG71XX_DRV_VERSION "0.5.7"
#define AG71XX_NAPI_TX 1
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 6793b4d..16dc029 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;