Linux I2C development
 help / color / mirror / Atom feed
* [PATCH] i2c: piix4: don't register SPDs on the AUX adapter
@ 2026-11-23  4:19 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-11-23  4:19 UTC (permalink / raw)
  To: linux-i2c; +Cc: Jean Delvare, Andi Shyti, Guenter Roeck, Thomas Weißschuh

piix4_add_adapter() intends to skip SPD registration on the AUX bus,
since on some platforms it reports all devices present. The check uses
"port == 0", but the AUX adapter is also added with port 0, so SPDs are
still probed there.

On an X470 board this binds ee1004 to a non-existent EEPROM at 0x51 on
the AUX bus:

  ee1004 10-0051: Failed to select page 0 (-6)
  ee1004 10-0051: 512 byte EE1004-compliant SPD EEPROM, read-only

Reading its eeprom then fails with -ENXIO.

Check hw_port_nr instead, which is 0 only for the main port 0 (and for
the main adapter of pre-SB800 controllers) and 1 for AUX.

Fixes: de4f2f52f932 ("i2c: piix4: Register SPDs")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/i2c/busses/i2c-piix4.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 7b6a4e201be4..a21e6d377bc2 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -969,8 +969,10 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
 	 * The AUX bus can not be probed as on some platforms it reports all
 	 * devices present and all reads return "0".
 	 * This would allow the ee1004 to be probed incorrectly.
+	 * The AUX adapter is also registered with port 0, so check the
+	 * hardware port number, which is 1 for AUX.
 	 */
-	if (port == 0)
+	if (hw_port_nr == 0)
 		i2c_register_spd_write_enable(adap);
 
 	*padap = adap;
-- 
2.56.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  4:19 [PATCH] i2c: piix4: don't register SPDs on the AUX adapter Rosen Penev

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