Skip to contentSkip to conversation

net: niu: fix missing register write in niu_txc_set_imask

PATCH New Ronan Marchal 1 participant 1 message Jul 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: niu: fix missing register write in niu_txc_set_imask

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.

---
 drivers/net/ethernet/sun/niu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/sun/niu.c +1 -0
index 88df15e6dd74..37079a6d6ee9 100644
@@ -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);
 }
 
Signature · 1 line
2.55.0