Skip to contentSkip to conversation

i2c: qcom: Fix IRQ error misassignement

PATCH Superseded Robert Foss 2 participants 3 messages Nov 27, 2020 – Nov 30, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i2c: qcom: Fix IRQ error misassignement

During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.

Fixes e517526195de ("i2c: Add Qualcomm CCI I2C driver")
---
 drivers/i2c/busses/i2c-qcom-cci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-qcom-cci.c +2 -2
index f13735beca58..1c259b5188de 100644
@@ -194,9 +194,9 @@ static irqreturn_t cci_isr(int irq, void *dev)
 	if (unlikely(val & CCI_IRQ_STATUS_0_I2C_M1_ERROR)) {
 		if (val & CCI_IRQ_STATUS_0_I2C_M1_Q0_NACK_ERR ||
 			val & CCI_IRQ_STATUS_0_I2C_M1_Q1_NACK_ERR)
-			cci->master[0].status = -ENXIO;
+			cci->master[1].status = -ENXIO;
 		else
-			cci->master[0].status = -EIO;
+			cci->master[1].status = -EIO;
 
 		writel(CCI_HALT_REQ_I2C_M1_Q0Q1, cci->base + CCI_HALT_REQ);
 		ret = IRQ_HANDLED;
Signature · 1 line
2.27.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Robert Foss

During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.

Fixes e517526195de ("i2c: Add Qualcomm CCI I2C driver")

You don't need a new line here.

Quoted 3 lines

Thanks,
Mani

#2 lore raw
Quoted 11 lines · Manivannan Sadhasivam
Quoted 7 lines · Robert Foss

During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.

Fixes e517526195de ("i2c: Add Qualcomm CCI I2C driver")

You don't need a new line here.

Ack

Quoted 6 lines
Quoted 4 lines

Thanks for the review!