]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: aspeed: Handle the coalesced stop conditions with the start conditions.
authorQuan Nguyen <quan@os.amperecomputing.com>
Mon, 11 Dec 2023 10:22:16 +0000 (17:22 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:13:31 +0000 (15:13 +0100)
commitf0c52b790a00afd6576ac9a569dd96fbfb34330b
tree29ffb0c988e67215ee51c901e8883dc61814d423
parentc87ab6e306bab660a2093a638b3316812721997d
i2c: aspeed: Handle the coalesced stop conditions with the start conditions.

[ Upstream commit b4cc1cbba5195a4dd497cf2f8f09e7807977d543 ]

Some masters may drive the transfers with low enough latency between
the nak/stop phase of the current command and the start/address phase
of the following command that the interrupts are coalesced by the
time we process them.
Handle the stop conditions before processing SLAVE_MATCH to fix the
complaints that sometimes occur below.

"aspeed-i2c-bus 1e78a040.i2c-bus: irq handled != irq. Expected
0x00000086, but was 0x00000084"

Fixes: f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed I2C driver")
Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-aspeed.c