2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 14:14:01 +08:00

net: netsec: Sync dma for device on buffer allocation

cd1973a921 ("net: netsec: Sync dma for device on buffer allocation")
was merged on it's v1 instead of the v3.
Merge the proper patch version

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ilias Apalodimas 2019-07-08 10:25:41 +03:00 committed by David S. Miller
parent 61a582be1a
commit bfb204129a

View File

@ -743,9 +743,7 @@ static void *netsec_alloc_rx_data(struct netsec_priv *priv,
*/
*desc_len = PAGE_SIZE - NETSEC_RX_BUF_NON_DATA;
dma_dir = page_pool_get_dma_dir(dring->page_pool);
dma_sync_single_for_device(priv->dev,
*dma_handle - NETSEC_RXBUF_HEADROOM,
PAGE_SIZE, dma_dir);
dma_sync_single_for_device(priv->dev, *dma_handle, *desc_len, dma_dir);
return page_address(page);
}