Re: [PATCH v10 1/2] net: airoha: npu: fix missing streaming DMA mask

Lorenzo Bianconi <[email protected]>
Newsgroups org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.netdev
Message-ID <aolkKmwLsvnmG8Td@lore-qca>
> 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.
> 
> Replace dma_set_coherent_mask() with dma_set_mask_and_coherent() to
> set both the streaming and coherent DMA masks, matching standard
> driver practice.
> 
> Fixes: 6f884eb87a79 ("net: airoha: Fix DMA direction for NPU mailbox buffer")
> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Daniel Pawlik <[email protected]>

Acked-by: Lorenzo Bianconi <[email protected]>

> ---
>  drivers/net/ethernet/airoha/airoha_npu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_npu.c b/drivers/net/ethernet/airoha/airoha_npu.c
> index b679bed952de..4045d1eb93ea 100644
> --- a/drivers/net/ethernet/airoha/airoha_npu.c
> +++ b/drivers/net/ethernet/airoha/airoha_npu.c
> @@ -766,7 +766,7 @@ static int airoha_npu_probe(struct platform_device *pdev)
>  		npu->irqs[i] = irq;
>  	}
>  
> -	err = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
> +	err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
>  	if (err)
>  		return err;
>  
> -- 
> 2.55.0
>
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaolkKgAKCRA6cBh0uS2t
rNLJAQClqStH75ruqGvASzQdetMn8Ppz4CPPTVAsMWPo/akT/wD9ECaDg33ScsTK
Dsxo0yNMrKwF78XzKE85XmFCUxf7jw8=
=mecl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.