* [PATCH] net: niu: fix missing register write in niu_txc_set_imask
@ 2026-07-25 14:54 Ronan Marchal
0 siblings, 0 replies; only message in thread
From: Ronan Marchal @ 2026-07-25 14:54 UTC (permalink / raw)
To: netdev
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, linux-kernel,
Ronan Marchal
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-25 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-25 14:54 [PATCH] net: niu: fix missing register write in niu_txc_set_imask Ronan Marchal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox