[PATCH] net: niu: fix missing register write in niu_txc_set_imask

From: Ronan Marchal

Date: Sat Jul 25 2026 - 10:55:28 EST


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@xxxxxxxxx>
---
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