mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] i2c: i801: Detect SPD Write Disable and expose as adapter quirk
@ 2026-02-05 10:29 Tinsae Tadesse
  2026-02-05 10:29 ` [PATCH 1/2] " Tinsae Tadesse
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Tinsae Tadesse @ 2026-02-05 10:29 UTC (permalink / raw)
  To: Wolfram Sang, Jean Delvare, Andi Shyti, Guenter Roeck
  Cc: Tinsae Tadesse, linux-i2c, linux-hwmon, linux-kernel

Hi I2C and HWMON maintainers,

Intel i801 SMBus controllers feature a "SPD Write Disable" bit 
in the SMBHSTCFG register. When set by firmware, the hardware 
silently blocks all write transactions to the SPD EEPROM 
address range (0x50-0x57) while allowing reads to succeed.

This creates a significant issue for the spd5118 hwmon driver. 
The SPD5118 requires write access for switching between 
register pages to read temperature data, and for cache 
synchronization during suspend/resume. When SPD Write Disable 
is set and the spd5118 driver attempts write transactions, the 
bus will generate a storm of SMBus DEV_ERR messages.

This patch series proposes a generic solution by:
1. Introducing a new adapter quirk flag in include/linux/i2c.h 
to communicate this hardware restriction.
2. Modifying drivers/i2c/i2c-i801.c to detect the SPD Write 
Disable bit and set the quirk flag.
3. Modifying drivers/hwmon/spd5118.c to check for this quirk 
during probe and fail cleanly, as write access is mandatory.

By using this mechanism, we avoid embedding device-specific 
policies in the controller driver and provide client drivers 
with the necessary information to make an informed decision.

Tinsae Tadesse (2):
  i2c: i801: Detect SPD Write Disable and expose as adapter quirk
  hwmon: spd5118: Fail probe if SPD writes are disabled

 drivers/hwmon/spd5118.c       | 15 +++++++++++++++
 drivers/i2c/busses/i2c-i801.c | 16 +++++++++++++++-
 include/linux/i2c.h           |  3 +++
 3 files changed, 33 insertions(+), 1 deletion(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] i2c: i801: Detect SPD Write Disable and expose as adapter quirk
@ 2026-06-30  7:06 Delaida Muminović
  0 siblings, 0 replies; 12+ messages in thread
From: Delaida Muminović @ 2026-06-30  7:06 UTC (permalink / raw)
  To: tinsaetadesse2015, wsa+renesas, jdelvare, andi.shyti, linux
  Cc: linux-i2c, linux-hwmon, linux-kernel

Tested the series on a machine that hits this bug:

  Lenovo ThinkPad T14 Gen 6 (21QCS1NV00)
  Fedora 44, kernel 7.0.13-200.fc44.x86_64
  BIOS N4JET27W 1.17

This controller has SPD Write Disable set:

  i801_smbus 0000:00:1f.4: SPD Write Disable is set

Without the series, spd5118 binds at 15-0050 and resume fails with:

  spd5118 15-0050: Failed to write b = 0: -6
  spd5118 15-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
  spd5118 15-0050: PM: failed to resume async: error -6

I rebuilt i2c-i801 and spd5118 with this series on the above kernel. i801 now
marks the adapter with I2C_AQ_SPD_WRITE_DISABLED, and spd5118 declines to bind:

  spd5118 15-0050: SPD Write Disable is set on adapter; refusing probe

spd5118 is loaded but not bound to the SPD device, so spd5118_resume() is never
registered and the -6 failure can no longer occur. The approach works on this
hardware and is cleaner than blacklisting the module.

Tested-by: Delaida Muminovic <delaidamuminovic2@gmail.com>

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

end of thread, other threads:[~2026-06-30  7:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-05 10:29 [PATCH 0/2] i2c: i801: Detect SPD Write Disable and expose as adapter quirk Tinsae Tadesse
2026-02-05 10:29 ` [PATCH 1/2] " Tinsae Tadesse
2026-06-08 12:28   ` Andi Shyti
2026-06-10  8:54     ` TINSAE TADESSE
2026-06-11  4:35       ` Guenter Roeck
2026-02-05 10:29 ` [PATCH 2/2] hwmon: spd5118: Fail probe if SPD writes are disabled Tinsae Tadesse
2026-02-05 13:46   ` Guenter Roeck
2026-02-21  9:57 ` [PATCH 0/2] i2c: i801: Detect SPD Write Disable and expose as adapter quirk TINSAE TADESSE
2026-04-21 17:56   ` Mark Pearson
2026-04-23 11:21     ` TINSAE TADESSE
2026-05-04 21:41       ` Mark Pearson
2026-06-30  7:06 Delaida Muminović

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®