From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Faliang Wang <faliang.wang@airoha.com>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net 1/2] net: airoha: fix NPU mailbox notification ordering
Date: Mon, 30 Nov 2026 09:27:37 +0100 [thread overview]
Message-ID: <aw0zeAQz3H1rv0eH@lore-desk> (raw)
In-Reply-To: <20261130034106.869059-2-faliang.wang@airoha.com>
[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]
> 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@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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-30 8:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 3:41 [PATCH net 0/2] net: airoha: fix NPU mailbox and WLAN initialization Faliang Wang
2026-11-30 3:41 ` [PATCH net 1/2] net: airoha: fix NPU mailbox notification ordering Faliang Wang
2026-11-30 8:27 ` Lorenzo Bianconi [this message]
2026-11-30 8:31 ` Faliang Wang (王法亮)
2026-11-30 3:41 ` [PATCH net 2/2] net: airoha: retry WLAN initialization commands Faliang Wang
2026-11-30 8:31 ` Lorenzo Bianconi
2026-11-30 3:45 ` [PATCH net 0/2] net: airoha: fix NPU mailbox and WLAN initialization netdev-bot+sinfo
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=aw0zeAQz3H1rv0eH@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=faliang.wang@airoha.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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