Qualcomm claims this is no-op for MIPS. Original commit message below:

From: Ben Menchaca <ben.mench...@qca.qualcomm.com>
Date: Fri, 7 Jun 2013 11:19:08 -0500
Subject: [ag71xx] DMA unmap FROM_DEVICE no-op for our arch

The invalidate for FROM_DEVICE map/unmap pairs is done in the map.
The unmap is a no-op, but there is a cost for accessing that no-op
function through the large number of indirection layers presented
by the MIPS linux dma_ops.

Signed-off-by: Ben Menchaca <ben.mench...@qca.qualcomm.com>
Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 566e951..b67e04e 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1051,8 +1051,14 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int 
limit)
                pktlen = desc->ctrl & pktlen_mask;
                pktlen -= ETH_FCS_LEN;
 
-               dma_unmap_single(&dev->dev, ring->buf[i].dma_addr,
-                                ag->rx_buf_size, DMA_FROM_DEVICE);
+               /*
+                * This is where we'd unmap our buffer from the GMAC in a
+                * general use of the DMA API.  On a MIPS platform this would
+                * be a complete no-op so we don't bother:
+                *
+                * dma_unmap_single(&dev->dev, ring->buf[i].dma_addr,
+                *                  ag->rx_buf_size, DMA_FROM_DEVICE);
+                */
 
                dev->stats.rx_packets++;
                dev->stats.rx_bytes += pktlen;
-- 
2.7.4


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to