[PATCH net 1/2] net: airoha: fix NPU mailbox notification ordering

Faliang Wang (王法亮) Faliang.Wang at airoha.com
Mon Nov 30 00:31:17 PST 2026


Hi Lorenzon,

	Thanks for your review, Patch information has been updated, and it will be re-sent tomorrow.

Best regards
Faliang Wang

-----Original Message-----
From: Lorenzo Bianconi <lorenzo at kernel.org> 
Sent: Monday, November 30, 2026 4:28 PM
To: Faliang Wang (王法亮) <Faliang.Wang at airoha.com>
Cc: netdev at vger.kernel.org; andrew+netdev at lunn.ch; davem at davemloft.net; edumazet at kernel.org; kuba at kernel.org; pabeni at redhat.com; linux-arm-kernel at lists.infradead.org; linux-mediatek at lists.infradead.org
Subject: Re: [PATCH net 1/2] net: airoha: fix NPU mailbox notification ordering

> During automated reboot testing, NPU mailbox communication can fail 
> intermittently and prevent Wi-Fi from coming up.
> 
> The message counter in CTRL(2) notifies the NPU that a new message is 
> ready. Write the function information to CTRL(3) before updating that 
> counter, so the NPU receives the function information before the 
> notification.
> 
> Fixes: REAL_LINUX_SHA ("EXACT_ORIGINAL_COMMIT_SUBJECT")

This does not seem a valid Fixes tag.

Regards,
Lorenzo

> Signed-off-by: Faliang Wang <faliang.wang at airoha.com>
> ---
>  drivers/net/ethernet/airoha/airoha_npu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_npu.c 
> b/drivers/net/ethernet/airoha/airoha_npu.c
> index edec6b111895..7f7cdc2553ad 100644
> --- a/drivers/net/ethernet/airoha/airoha_npu.c
> +++ b/drivers/net/ethernet/airoha/airoha_npu.c
> @@ -178,10 +178,10 @@ static int airoha_npu_send_msg(struct airoha_npu 
> *npu, int func_id,
>  
>  	regmap_write(npu->regmap, REG_CR_MBQ0_CTRL(0) + offset, dma_addr);
>  	regmap_write(npu->regmap, REG_CR_MBQ0_CTRL(1) + offset, size);
> -	regmap_read(npu->regmap, REG_CR_MBQ0_CTRL(2) + offset, &val);
> -	regmap_write(npu->regmap, REG_CR_MBQ0_CTRL(2) + offset, val + 1);
>  	val = FIELD_PREP(MBOX_MSG_FUNC_ID, func_id) | MBOX_MSG_WAIT_RSP;
>  	regmap_write(npu->regmap, REG_CR_MBQ0_CTRL(3) + offset, val);
> +	regmap_read(npu->regmap, REG_CR_MBQ0_CTRL(2) + offset, &val);
> +	regmap_write(npu->regmap, REG_CR_MBQ0_CTRL(2) + offset, val + 1);
>  
>  	ret = regmap_read_poll_timeout_atomic(npu->regmap,
>  					      REG_CR_MBQ0_CTRL(3) + offset,
> --
> 2.43.0
> 


More information about the linux-arm-kernel mailing list