i2c: qcom: Fix IRQ error misassignement
PATCH 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.
--- drivers/i2c/busses/i2c-qcom-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-qcom-cci.c +2 -2
@@ -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
Quoted 2 lines · Robert Foss
During
cci_isr()errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to
s/correctly/incorrectly
Quoted 3 lines
i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.
This patch fixes a legitimate bug. So there should be a fixes tag!
Quoted 1 line
Suggested-by Loic Poulain <[email protected]>
Reported-by?
Thanks,
Mani
Quoted 24 lines
Signed-off-by Robert Foss <[email protected]>--- drivers/i2c/busses/i2c-qcom-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/i2c/busses/i2c-qcom-cci.c +2
-2@@ -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
Thanks for the review Mani.
Quoted 6 lines · Manivannan Sadhasivam
Quoted 2 lines · Robert Foss
During
cci_isr()errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging tos/correctly/incorrectly
I don't think there actually is an error in the comment.
Quoted 6 lines
Quoted 4 lines
i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.
This patch fixes a legitimate bug. So there should be a fixes tag!
On it, fixed in v2
Quoted 4 lines
Quoted 2 lines
Suggested-by Loic Poulain <[email protected]>Reported-by?
I'll add both in v2
Quoted 5 lines · Robert Foss
Thanks for the review Mani.
Quoted 1 line · Manivannan Sadhasivam
Quoted 8 lines
Quoted 5 lines · Robert Foss
Quoted 2 lines
During
cci_isr()errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging tos/correctly/incorrectly
I don't think there actually is an error in the comment.
Yeah its an error in my comment ;) Please ignore that.
Thanks,
Mani
Quoted 15 lines
Quoted 6 lines
Quoted 4 lines
i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1.
This patch fixes a legitimate bug. So there should be a fixes tag!
On it, fixed in v2
Quoted 4 lines
Quoted 2 lines
Suggested-by Loic Poulain <[email protected]>Reported-by?
I'll add both in v2