i2c: tegra: recover from spurious interrupt storm
authorTodd Poynor <toddpoynor@google.com>
Mon, 25 Apr 2011 21:32:25 +0000 (15:32 -0600)
committerBen Dooks <ben-linux@fluff.org>
Wed, 11 May 2011 05:45:50 +0000 (06:45 +0100)
commitcb63c62d8ee56d169463d8125ec32e1aa0fe11de
treee52fcd155f0ee846ff132d3fcecf44dde640da1c
parent65a1a0ace554d61ea5a90377a54df1505275c1b1
i2c: tegra: recover from spurious interrupt storm

Re-init the I2C controller when an IRQ arrives with no
I2C_INT_STATUS bits set to indicate why the interrupt was sent.
Storms of such mystery interrupts are infrequently seen.

Dump some more status when these interrupts arrive.  Set an error
for the current request and wake up the requester (rather than
timing out the request or possibly silently ignoring the interrupts).

If the I2C block is inside the DVC, also ACK the DVC I2C transfer
done interrupt in the ISR error return path, as is done for the
normal return path.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
[swarren: Fix minor checkpatch whitespace issue, commit tag]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
drivers/i2c/busses/i2c-tegra.c