Message ID | 20201127133937.93208-1-robert.foss@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [v2] i2c: qcom: Fix IRQ error misassignement | expand |
On Fri, Nov 27, 2020 at 02:39:37PM +0100, Robert Foss wrote: > 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. > Reported-by: Loic Poulain <loic.poulain@linaro.org> > Suggested-by: Loic Poulain <loic.poulain@linaro.org> > Signed-off-by: Robert Foss <robert.foss@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Thanks, Mani
On Fri, 27 Nov 2020 at 17:06, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote: > > On Fri, Nov 27, 2020 at 02:39:37PM +0100, Robert Foss wrote: > > 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 > > > Reported-by: Loic Poulain <loic.poulain@linaro.org> > > Suggested-by: Loic Poulain <loic.poulain@linaro.org> > > Signed-off-by: Robert Foss <robert.foss@linaro.org> > > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Thanks for the review!
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index f13735beca58..1c259b5188de 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -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;
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") Reported-by: Loic Poulain <loic.poulain@linaro.org> Suggested-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Robert Foss <robert.foss@linaro.org> --- drivers/i2c/busses/i2c-qcom-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0