net: macb: Drop local cache flush
authorVignesh Raghavendra <vigneshr@ti.com>
Thu, 16 Jan 2020 08:53:48 +0000 (14:23 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 25 Jan 2020 17:04:36 +0000 (12:04 -0500)
Now that arch specific dma mapping APIs take care of cache
flush/invalidate, drop local cache flush operation.
While at that fix dma_unmap_single() call to match new prototype

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/net/macb.c

index 83594253787cefb0736e9e70a558b4338ddd7607..0d4929bec1319783e31859d7e3ed21aa30cf6fd4 100644 (file)
@@ -327,8 +327,6 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
        macb->tx_ring[tx_head].addr = paddr;
        barrier();
        macb_flush_ring_desc(macb, TX);
-       /* Do we need check paddr and length is dcache line aligned? */
-       flush_dcache_range(paddr, paddr + ALIGN(length, ARCH_DMA_MINALIGN));
        macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART));
 
        /*
@@ -344,7 +342,7 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
                udelay(1);
        }
 
-       dma_unmap_single(packet, length, paddr);
+       dma_unmap_single(packet, length, DMA_TO_DEVICE);
 
        if (i <= MACB_TX_TIMEOUT) {
                if (ctrl & MACB_BIT(TX_UNDERRUN))