• Sergei Shtylyov's avatar
    i2c: rcar: fix MNR interrupt handling · 27d1ba1a
    Sergei Shtylyov authored
    commit dd318b0d upstream.
    
    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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
    [ kamal: backport to 3.13-stable: context ]
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    27d1ba1a
i2c-rcar.c 17 KB