summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorRobert Hancock <robert.hancock@calian.com>2023-06-06 12:25:58 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-19 16:22:07 +0200
commit15970b0828c142f7f79926fe1c48f2ab58b7a07d (patch)
tree458fd2501e6e73dee63cbbde8049df020ddea535 /drivers/md
parente9fbb7c2f65e900fc6505274f70cd9db3c876667 (diff)
downloadlinux-stable-15970b0828c142f7f79926fe1c48f2ab58b7a07d.tar.gz
linux-stable-15970b0828c142f7f79926fe1c48f2ab58b7a07d.tar.bz2
linux-stable-15970b0828c142f7f79926fe1c48f2ab58b7a07d.zip
i2c: xiic: Don't try to handle more interrupt events after error
[ Upstream commit cb6e45c9a0ad9e0f8664fd06db0227d185dc76ab ] In xiic_process, it is possible that error events such as arbitration lost or TX error can be raised in conjunction with other interrupt flags such as TX FIFO empty or bus not busy. Error events result in the controller being reset and the error returned to the calling request, but the function could potentially try to keep handling the other events, such as by writing more messages into the TX FIFO. Since the transaction has already failed, this is not helpful and will just cause issues. This problem has been present ever since: commit 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr") which allowed non-error events to be handled after errors, but became more obvious after: commit 743e227a8959 ("i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()") which reworked the code to add a WARN_ON which triggers if both the xfer_more and wakeup_req flags were set, since this combination is not supposed to happen, but was occurring in this scenario. Skip further interrupt handling after error flags are detected to avoid this problem. Fixes: 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr") Signed-off-by: Robert Hancock <robert.hancock@calian.com> Acked-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/md')
0 files changed, 0 insertions, 0 deletions