Public bug reported:
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.
** Affects: linux-bluefield (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
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 (mlx_ipmid and set_emu_param) and then do an
SMBus block read with "i2cget -y 5 0x20 0x00 s" and verify non-zero values are
returned.
+ * 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.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2165146
Title:
i2c-mlxbf: corrupted slave address in read phase
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/2165146/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs