ACK: [SRU][J:linux-bluefield/N:linux-bluefield][PATCH 0/1] UBUNTU: SAUCE: i2c: mlxbf: Use bitmask to set gateway flags
Alessio Faina
alessio.faina at canonical.com
Fri Sep 4 16:26:05 UTC 2026
On Thu, Sep 03, 2026 at 10:07:11AM -0400, Chris Babroski via kernel-team wrote:
> 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
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Acked-by: Alessio Faina <alessio.faina at canonical.com>
More information about the kernel-team
mailing list