i2c: uniphier-f: fix race condition when IRQ is cleared
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 16 Oct 2018 03:01:49 +0000 (12:01 +0900)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 29 Oct 2018 18:53:37 +0000 (18:53 +0000)
commiteaba68785c2d24ebf1f0d46c24e11b79cc2f94c7
tree934fcac325c5fcac927b0c5b1ded7965a02a859f
parent39226aaa85f002d695e3cafade3309e12ffdaecd
i2c: uniphier-f: fix race condition when IRQ is cleared

The current IRQ handler clears all the IRQ status bits when it bails
out. This is dangerous because it might clear away the status bits
that have just been set while processing the current handler. If this
happens, the IRQ event for the latest transfer is lost forever.

The IRQ status bits must be cleared *before* the next transfer is
kicked.

Fixes: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-uniphier-f.c