Skip to content

Commit

Permalink
net: ethernet: mtk_eth_soc: set coherent mask to get PPE working
Browse files Browse the repository at this point in the history
Set DMA coherent mask to 32-bit which makes PPE offloading engine start
working on BPi-R4 which got 4 GiB of RAM.

Fixes: 2d75891 ("net: ethernet: mtk_eth_soc: support 36-bit DMA addressing on MT7988")
Suggested-by: Elad Yifee <eladwf@users.github.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Jan 24, 2024
1 parent add4a54 commit 97e9092
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4761,7 +4761,10 @@ static int mtk_probe(struct platform_device *pdev)
}

if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) {
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36));
err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(36));
if (!err)
err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));

if (err) {
dev_err(&pdev->dev, "Wrong DMA config\n");
return -EINVAL;
Expand Down

0 comments on commit 97e9092

Please sign in to comment.