All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND v1 0/3] i2c: mlxbf: Fix master GW corruption
@ 2026-11-20 19:50 Chris Babroski
  2026-11-20 19:50 ` [PATCH RESEND v1 1/3] i2c: mlxbf: Fix master GW corruption from unmasked SMBus flags Chris Babroski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Babroski @ 2026-11-20 19:50 UTC (permalink / raw)
  To: linux-i2c, linux-kernel
  Cc: kblaiech, asmaa, andi.shyti, cbabroski, davthompson

This patch series fixes a bug that corrupts the slave address used in read
phases and cleans up the code to prevent similar corruption scenarios from
occurring in the future.

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. This caused slave address
corruption in read phases (unlike write phases which use the data_desc[0] slave
address value).

Patch 1 fixes this corruption issue by converting the flags to booleans before
setting their values in the control register.

Patch 2 converts register field accesses from explicit shifts to
BIT()/GENMASK()/FIELD_PREP().

Patch 3 removes an unnecessary register write (dead code).

Chris Babroski (3):
  i2c: mlxbf: Fix master GW corruption from unmasked SMBus flags
  i2c: mlxbf: Use GENMASK()/FIELD_PREP() for GW fields
  i2c: mlxbf: Remove unused slave GW PEC handling

 drivers/i2c/busses/i2c-mlxbf.c | 40 +++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 20 deletions(-)


base-commit: 9c19b1c078541841f6b68f815bb4ba5201ab2b65
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-20 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 19:50 [PATCH RESEND v1 0/3] i2c: mlxbf: Fix master GW corruption Chris Babroski
2026-11-20 19:50 ` [PATCH RESEND v1 1/3] i2c: mlxbf: Fix master GW corruption from unmasked SMBus flags Chris Babroski
2026-11-20 19:50 ` [PATCH RESEND v1 2/3] i2c: mlxbf: Use GENMASK()/FIELD_PREP() for GW fields Chris Babroski
2026-11-20 19:50 ` [PATCH RESEND v1 3/3] i2c: mlxbf: Remove unused slave GW PEC handling Chris Babroski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.