]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net:enetc: allocate CBD ring data memory using DMA coherent methods
authorPo Liu <po.liu@nxp.com>
Wed, 9 Feb 2022 12:33:01 +0000 (20:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:58:05 +0000 (13:58 +0200)
commite6fa83a0c1969f071331fd26fd141d90cfbb0e40
treefe68dc7ed89258fa1b01b4f4521ecd22345d0b2b
parent23587481ef1ba41b71b0f83e903dbbd95123670f
net:enetc: allocate CBD ring data memory using DMA coherent methods

[ Upstream commit b3a723dbc94a6e38f67669d03b521edd766ad895 ]

To replace the dma_map_single() stream DMA mapping with DMA coherent
method dma_alloc_coherent() which is more simple.

dma_map_single() found by Tim Gardner not proper. Suggested by Claudiu
Manoil and Jakub Kicinski to use dma_alloc_coherent(). Discussion at:

https://lore.kernel.org/netdev/AM9PR04MB8397F300DECD3C44D2EBD07796BD9@AM9PR04MB8397.eurprd04.prod.outlook.com/t/

Fixes: 888ae5a3952ba ("net: enetc: add tc flower psfp offload driver")
cc: Claudiu Manoil <claudiu.manoil@nxp.com>
Reported-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Po Liu <po.liu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_qos.c