[SRU][J:linux-bluefield/N:linux-bluefield][PATCH 0/1] UBUNTU: SAUCE: i2c: mlxbf: Use bitmask to set gateway flags
Chris Babroski
cbabroski at nvidia.com
Thu Sep 3 14:07:11 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2165146
SRU Justification:
[Impact]
When the MLXBF_I2C_F_SMBUS_BLOCK and/or MLXBF_I2C_F_SMBUS_PEC flags are set, the flag bitmask
values are shifted and written to the master gateway control register instead of the single-bit
flag values. Shifting and writing the bitmasks can corrupt adjacent bits and results in the wrong
slave address getting written to the master gateway.
[Fix]
Convert the SMBus flags to boolean values before setting the master gateway control register. Use
bitmasks and FIELD_PREP instead of explicit shifting when setting register fields to help prevent
data corruption. Remove unnecessary register writes.
[Test Case]
* "ipmitool lan print", "ipmitool mc info", and "ipmitool sdr list" can be used to verify ARM <->
BMC I2C communication is working as expected. Regression tests I2C1 and I2C5 BlueField bus
usage.
* Read and decode I2C registers to confirm slave address is set correctly in master gateway
register.
* Stop all IPMI related services and then do an SMBus block read with "i2cget -y 5 0x20 0x00 s"
and verify non-zero values are returned. To stop IPMI related services and bus users:
1. systemctl stop mlx_ipmid
2. systemctl stop set_emu_param
3. modprobe -r ipmb_host
4. modprobe -r ipmb_dev_int
[Regression Potential]
Low regression potential because the slave address that was getting corrupted is only used in the
read phase of an I2C/SMBus master transaction. On BlueField the only exposed I2C busses in Linux
are used for IPMI communication between ARM and BMC with write-only transactions.
Chris Babroski (1):
UBUNTU: SAUCE: i2c: mlxbf: Use bitmask to set gateway flags
drivers/i2c/busses/i2c-mlxbf.c | 40 +++++++++++++++++-----------------
1 file changed, 20 insertions(+), 20 deletions(-)
--
2.34.1
More information about the kernel-team
mailing list