Skip to contentSkip to conversation

i2c: npcm7xx: disable I2C interrupt before devm_request_irq

PATCH In review Tomer Maimon 2 participants 3 messages Jul 9, 2024 – Jul 16, 2024

Subsystems (2)
lore
Share & tools
lore

Tomer Maimon

author maintainer
#0 lore raw

PATCH 1/1 i2c: npcm7xx: disable I2C interrupt before devm_request_irq

This patch fix NPCM I2C driver issue that causing a soft lockup issue.

Upon investigation, it was found that during an I2C transaction, the BMC machine reboots unexpectedly, leaving the I2C module in an unchanged state. As a result, the I2C interrupt (IRQ) handler continues to be triggered. To address this, NPCM I2C probe function disable the I2C interrupt enable bit in the I2C module before invoking devm_request_irq function.

---
 drivers/i2c/busses/i2c-npcm7xx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-npcm7xx.c +2 -0
index ae4bae63ad4f..ca73760522f5 100644
@@ -2333,6 +2333,8 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
+	npcm_i2c_int_enable(bus, false);
+
 	ret = devm_request_irq(bus->dev, irq, npcm_i2c_bus_irq, 0,
 			       dev_name(bus->dev), bus);
 	if (ret)
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 9 lines · Tomer Maimon

This patch fix NPCM I2C driver issue that causing a soft lockup issue.

Upon investigation, it was found that during an I2C transaction, the BMC machine reboots unexpectedly, leaving the I2C module in an unchanged state. As a result, the I2C interrupt (IRQ) handler continues to be triggered. To address this, NPCM I2C probe function disable the I2C interrupt enable bit in the I2C module before invoking devm_request_irq function.

Quoted 5 lines
---
 drivers/i2c/busses/i2c-npcm7xx.c | 2 ++
 1 file changed, 2 insertions(+)

What's the state of this patch with respect to upstream? Is this something specific to the openbmc/linux dev-6.6 tree, or is there an upstream equivalent? If the latter, can you please link to the relevant patch?

Andrew

author maintainer
#2 lore raw

Hi Andrew,

Quoted 17 lines · Andrew Jeffery
Quoted 9 lines · Tomer Maimon

This patch fix NPCM I2C driver issue that causing a soft lockup issue.

Upon investigation, it was found that during an I2C transaction, the BMC machine reboots unexpectedly, leaving the I2C module in an unchanged state. As a result, the I2C interrupt (IRQ) handler continues to be triggered. To address this, NPCM I2C probe function disable the I2C interrupt enable bit in the I2C module before invoking devm_request_irq function.

Quoted 5 lines
---
 drivers/i2c/busses/i2c-npcm7xx.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 4 lines

What's the state of this patch with respect to upstream? Is this something specific to the openbmc/linux dev-6.6 tree, or is there an upstream equivalent? If the latter, can you please link to the relevant patch?

This patch set hasn't been upstream yet to OpenBMC vanilla and Its not specific to openbmc/linux dev-6.6 tree.
We plan to upstream it to Linux version 6.11 (I believe it the next few weeks), since we need to upgrade the NPCM from dev-6.1 to dev-6.6, we would appreciate if you could add it now to dev-6.6

Quoted 2 lines

Andrew

Thanks,

Tomer