i2c: rcar: fix MNR interrupt handling
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Mon, 1 Sep 2014 21:15:26 +0000 (01:15 +0400)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:16:19 +0000 (11:16 +0100)
commit5b2ee54abbebd43d85e9f7629a9e6e738feac4e9
tree3628fb3b8e962b64e0d96616e70c0063387c788d
parent13f49df33fde59f38a5ba279fd653cc884a21420
i2c: rcar: fix MNR interrupt handling

Sometimes the MNR and MST interrupts happen simultaneously  (stop  automatically
follows NACK, according to the manuals) and in such case the ID_NACK flag  isn't
set since the MST interrupt handling precedes MNR and all interrupts are cleared
and disabled then, so that MNR interrupt is never noticed -- this causes NACK'ed
transfers to be falsely reported as successful. Exchanging MNR and  MST handlers
fixes this issue, however the MNR bit  somehow  gets set again even after  being
explicitly cleared, so I decided to completely suppress handling of all disabled
interrupts (which is a good thing anyway)...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit dd318b0df27c582ac0d72a346fd6e693700be23c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/i2c/busses/i2c-rcar.c