From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Daniel Pawlik <pawlik.dan@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, nbd@nbd.name,
sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, yangshiji66@outlook.com,
upstream@airoha.com
Subject: Re: [PATCH v10 1/2] net: airoha: npu: fix missing streaming DMA mask
Date: Mon, 24 Aug 2026 09:13:22 +0200 [thread overview]
Message-ID: <aovvEvI4sADve2iu@lore-desk> (raw)
In-Reply-To: <CALC2Api8nhePvuUPsw9CE6nX-0pFOMO5qy=4fzqox8_XM4eSqw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
> Hi,
>
> I tested both patches independently:
>
> - Patch 1 alone (DMA mask): NPU reports version 0.0 - probe fails.
> The streaming mask is correct but 24-byte buffers still bounce
> through swiotlb, and the NPU can't write to that address range.
I guess we need to understand why swiotlb bounce buffers are not working
here since these are valid address where the device should be capable of
performing DMA ops.
Adding Airoha folks in the loop. Any input on this?
>
> - Patch 2 alone (cacheline buffers): NPU reports version 0.1111 -
> works. Cache-line-aligned allocations bypass swiotlb entirely.
I guess this is just a workaround for this particular case.
Regards,
Lorenzo
>
> So patch 2 is the essential fix, but patch 1 is still good to have as
> a defensive measure - without a proper streaming DMA mask, any
> future sub-cacheline streaming mapping would silently break.
>
> Dan
>
> sob., 22 sie 2026 o 21:27 Jakub Kicinski <kuba@kernel.org> napisał(a):
> >
> > On Thu, 20 Aug 2026 10:59:40 +0200 Daniel Pawlik wrote:
> > > The driver calls dma_set_coherent_mask() but never dma_set_mask(),
> > > leaving the streaming DMA mask at the bus default. On the non-coherent
> > > EN7581 platform (Cortex-A53), this causes the NPU mailbox to hang
> > > after approximately 41 calls when using streaming DMA mappings.
> >
> > Can you confirm if patch 2 is still needed after this fix?
>
>
>
> --
> Z poważaniem,
> Daniel Pawlik
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-08-24 7:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 8:59 [PATCH v10 1/2] net: airoha: npu: fix missing streaming DMA mask Daniel Pawlik
2026-08-20 8:59 ` [PATCH v10 2/2] net: airoha: npu: use cacheline-sized buffers for mailbox DMA Daniel Pawlik
2026-08-22 8:56 ` [PATCH v10 1/2] net: airoha: npu: fix missing streaming DMA mask Lorenzo Bianconi
2026-08-22 19:27 ` Jakub Kicinski
2026-08-23 10:41 ` Daniel Pawlik
2026-08-24 7:13 ` 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=aovvEvI4sADve2iu@lore-desk \
--to=lorenzo@kernel.org \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pawlik.dan@gmail.com \
--cc=sean.wang@mediatek.com \
--cc=upstream@airoha.com \
--cc=yangshiji66@outlook.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox