[linux dev-6.6 v1] i2c: npcm7xx: disable I2C interrupt before devm_request_irq

Tomer Maimon tmaimon77 at gmail.com
Tue Jul 9 20:54:12 AEST 2024


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.

Signed-off-by: Tyrone Ting <kfting at nuvoton.com>
Signed-off-by: Tomer Maimon <tmaimon77 at gmail.com>
---
 drivers/i2c/busses/i2c-npcm7xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index ae4bae63ad4f..ca73760522f5 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -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)
-- 
2.34.1



More information about the openbmc mailing list