]> git.ipfire.org Git - thirdparty/linux.git/commit
i3c: dw-i3c-master: fix SIR reject bit mapping for dynamic addresses
authorAdrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Tue, 27 Jan 2026 02:05:07 +0000 (10:05 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 30 Jan 2026 23:05:22 +0000 (00:05 +0100)
commited318b3fb4ab317c533d38d160326fa5d7569497
tree854669f972eb92152109c4b7ff7bad72aee825bc
parentc7311aa4a71ebbf6e86e3173e04afbad233a3937
i3c: dw-i3c-master: fix SIR reject bit mapping for dynamic addresses

The IBI_SIR_REQ_REJECT register is a 32-bit bitmap indexed by the
dynamic address of each I3C slave. The DesignWare controller derives
the bit index by folding the 7-bit dynamic address into a 5-bit value,
using the sum of the lower 5 bits and the upper 2 bits, modulo 32.

The current implementation incorrectly uses the device table index
when updating the SIR reject mask, which can result in rejecting or
accepting IBIs for the wrong device.

Compute the SIR reject bit index directly from the dynamic address,
as defined by the controller specification, and use it consistently
when updating the reject mask.

Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/d4ad8161e604156c60327060ad3d339ebf18fe4f.1769479330.git.adrianhoyin.ng@altera.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/dw-i3c-master.c