]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit05d9421849e1cab8c18933e4fc373a51c2ee7e85
tree934fcac325c5fcac927b0c5b1ded7965a02a859f
parentbe5cd9bfb8bfa7e669e122e68b16cf8869780d5c
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: c33141b65282 ("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