All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, Rex Lu <rex.lu@mediatek.com>,
	Daniel Pawlik <pawlik.dan@gmail.com>,
	Matteo Croce <teknoraver@meta.com>
Subject: Re: [PATCH net] net: mtk: wed: add dma mask limitation and GFP_DMA32 for device with more than 4GB DRAM
Date: Wed, 8 Oct 2025 15:19:27 +0200	[thread overview]
Message-ID: <aOZk35XuJmLwCvZY@lore-desk> (raw)
In-Reply-To: <20251008123731.GR3060232@horms.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

> On Wed, Oct 08, 2025 at 12:48:05PM +0200, Lorenzo Bianconi wrote:
> > From: Rex Lu <rex.lu@mediatek.com>
> > 
> > Limit tx/rx buffer address to 32-bit address space for board with more
> > than 4GB DRAM.
> > 
> 
> Hi Lorenzo, Rex, all,

Hi Simon,

> 
> As a fix for net a Fixes tag should probably go here.
> > Tested-by: Daniel Pawlik <pawlik.dan@gmail.com>
> > Tested-by: Matteo Croce <teknoraver@meta.com>
> > Signed-off-by: Rex Lu <rex.lu@mediatek.com>
> > Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.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.

right, I will fix it in v2.

Regards,
Lorenzo

> 
> > +
> >  	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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2025-10-08 13:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08 10:48 [PATCH net] net: mtk: wed: add dma mask limitation and GFP_DMA32 for device with more than 4GB DRAM Lorenzo Bianconi
2025-10-08 12:37 ` Simon Horman
2025-10-08 13:19   ` Lorenzo Bianconi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aOZk35XuJmLwCvZY@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pawlik.dan@gmail.com \
    --cc=rex.lu@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=teknoraver@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.