we can ack stat and complete the command from the errata handling itself. Signed-off-by: Felipe Balbi <balbi@xxxxxx> --- drivers/i2c/busses/i2c-omap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index dba174c..9dadfb1 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -903,7 +903,7 @@ omap_i2c_threaded_isr(int this_irq, void *dev_id) } dev_dbg(dev->dev, "IRQ (ISR = 0x%04x)\n", stat); -complete: + if (stat & OMAP_I2C_STAT_NACK) { dev_err(dev->dev, "No Acknowledge\n"); err |= OMAP_I2C_STAT_NACK; @@ -980,7 +980,9 @@ complete: stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG); if (ret < 0) { err |= OMAP_I2C_STAT_XUDF; - goto complete; + omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XUDF | + OMAP_I2C_STAT_XDR); + omap_i2c_complete_cmd(dev, err); } omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XDR); @@ -998,7 +1000,9 @@ complete: stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG); if (ret < 0) { err |= OMAP_I2C_STAT_XUDF; - goto complete; + omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XUDF | + OMAP_I2C_STAT_XRDY); + omap_i2c_complete_cmd(dev, err); } omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XRDY); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html