[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180924113125.577011821@linuxfoundation.org>
Date: Mon, 24 Sep 2018 13:53:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Ioana Radulescu <ruxandra.radulescu@....com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.18 224/235] staging: fsl-dpaa2/eth: Fix DMA mapping direction
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ioana Radulescu <ruxandra.radulescu@....com>
[ Upstream commit 466bcdc1fa303be175c45d054bb00effc575033a ]
We are using DMA_FROM_DEVICE when mapping RX frame buffers,
but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA
unmapping operation.
Fixes: 87eb55e418b7 ("staging: fsl-dpaa2/eth: Fix potential endless loop")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@....com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -767,7 +767,7 @@ static void free_bufs(struct dpaa2_eth_p
for (i = 0; i < count; i++) {
vaddr = dpaa2_iova_to_virt(priv->iommu_domain, buf_array[i]);
dma_unmap_single(dev, buf_array[i], DPAA2_ETH_RX_BUF_SIZE,
- DMA_BIDIRECTIONAL);
+ DMA_FROM_DEVICE);
skb_free_frag(vaddr);
}
}
Powered by blists - more mailing lists