On Sat, 2019-12-21 at 11:49 +0100, Daniel Wagner wrote:
From: Arnd Bergmann arnd@arndb.de
[ Upstream commit 84092996673211f16ef3b942a191d7952e9dfea9 ]
[...]
Pavel reported this fix is needed for the CIP kernel.
Since this patch was added to v4.5, we only need to backport to v4.4.
It looks like it's also applicable to 3.16, so I've queued it up for that.
Ben.
Thanks, Daniel
drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 657b65bf5cac..18bf3a8fdc50 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -82,7 +82,7 @@ struct cpdma_desc { struct cpdma_desc_pool { phys_addr_t phys;
- u32 hw_addr;
- dma_addr_t hw_addr; void __iomem *iomap; /* ioremap map */ void *cpumap; /* dma_alloc map */ int desc_size, mem_size;
@@ -152,7 +152,7 @@ struct cpdma_chan {
- abstract out these details
*/ static struct cpdma_desc_pool * -cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr, +cpdma_desc_pool_create(struct device *dev, u32 phys, dma_addr_t hw_addr, int size, int align) { int bitmap_size; @@ -176,13 +176,13 @@ cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr, if (phys) { pool->phys = phys;
pool->iomap = ioremap(phys, size);
pool->hw_addr = hw_addr; } else {pool->iomap = ioremap(phys, size); /* should be memremap? */
pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys,
pool->cpumap = dma_alloc_coherent(dev, size, &pool->hw_addr, GFP_KERNEL);
pool->iomap = pool->cpumap;
pool->hw_addr = pool->phys;
pool->iomap = (void __iomem __force *)pool->cpumap;
}pool->phys = pool->hw_addr; /* assumes no IOMMU, don't use this value */
if (pool->iomap)