[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251008123731.GR3060232@horms.kernel.org>
Date: Wed, 8 Oct 2025 13:37:31 +0100
From: Simon Horman <horms@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Felix Fietkau <nbd@....name>, Sean Wang <sean.wang@...iatek.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, Rex Lu <rex.lu@...iatek.com>,
Daniel Pawlik <pawlik.dan@...il.com>,
Matteo Croce <teknoraver@...a.com>
Subject: Re: [PATCH net] net: mtk: wed: add dma mask limitation and GFP_DMA32
for device with more than 4GB DRAM
On Wed, Oct 08, 2025 at 12:48:05PM +0200, Lorenzo Bianconi wrote:
> From: Rex Lu <rex.lu@...iatek.com>
>
> Limit tx/rx buffer address to 32-bit address space for board with more
> than 4GB DRAM.
>
Hi Lorenzo, Rex, all,
As a fix for net a Fixes tag should probably go here.
> Tested-by: Daniel Pawlik <pawlik.dan@...il.com>
> Tested-by: Matteo Croce <teknoraver@...a.com>
> Signed-off-by: Rex Lu <rex.lu@...iatek.com>
> Co-developed-by: Lorenzo Bianconi <lorenzo@...nel.org>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
...
> @@ -2426,6 +2426,10 @@ mtk_wed_attach(struct mtk_wed_device *dev)
> dev->version = hw->version;
> dev->hw->pcie_base = mtk_wed_get_pcie_base(dev);
>
> + ret = dma_set_mask_and_coherent(hw->dev, DMA_BIT_MASK(32));
> + if (ret)
> + return ret;
I think 'goto out' is needed here to avoid leaking hw_lock.
> +
> if (hw->eth->dma_dev == hw->eth->dev &&
> of_dma_is_coherent(hw->eth->dev->of_node))
> mtk_eth_set_dma_device(hw->eth, hw->dev);
>
--
pw-bot: changes-requested
Powered by blists - more mailing lists