From: Ronan Marchal <ronanmarchal29@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
Ronan Marchal <ronanmarchal29@gmail.com>
Subject: [PATCH] net: niu: fix missing register write in niu_txc_set_imask
Date: Sat, 25 Jul 2026 16:54:24 +0200 [thread overview]
Message-ID: <20260725145424.435297-1-ronanmarchal29@gmail.com> (raw)
While reviewing W=1 build warnings in this driver, I noticed
niu_txc_set_imask() reads TXC_INT_MASK, computes the new mask
value, but never writes it back to the register, making the
function a no-op regardless of the imask parameter passed in.
Add the missing nw64(TXC_INT_MASK, val) call so the function
actually programs the mask as its name and signature imply.
I don't have access to this hardware (Sun Neptune NIU), so this
was found through code review, not tested on real hardware.
Signed-off-by: Ronan Marchal <ronanmarchal29@gmail.com>
---
drivers/net/ethernet/sun/niu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 88df15e6dd74..37079a6d6ee9 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -4650,6 +4650,7 @@ static void niu_txc_set_imask(struct niu *np, u64 imask)
val = nr64(TXC_INT_MASK);
val &= ~TXC_INT_MASK_VAL(np->port);
val |= (imask << TXC_INT_MASK_VAL_SHIFT(np->port));
+ nw64(TXC_INT_MASK, val);
niu_unlock_parent(np, flags);
}
--
2.55.0
reply other threads:[~2026-07-25 14:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260725145424.435297-1-ronanmarchal29@gmail.com \
--to=ronanmarchal29@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.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