]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: xiic: Fix RX IRQ busy check
authorMarek Vasut <marex@denx.de>
Mon, 23 Aug 2021 21:41:45 +0000 (23:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:22 +0000 (15:11 +0200)
commita50c8564ab821bcb31a62799877f789fbd4b95eb
tree9f47e2d29f206e22ae43976c53ff6ac5f4c5ffc6
parentc7ed4ddaa5a236bde32de46266a9b0e55701201d
i2c: xiic: Fix RX IRQ busy check

[ Upstream commit 294b29f15469e90893c2b72a738a962ee02a12eb ]

In case the XIIC does TX/RX transfer, make sure no other kernel thread
can start another TX transfer at the same time. This could happen since
the driver only checks tx_msg for being non-NULL and returns -EBUSY in
that case, however it is necessary to check also rx_msg for the same.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: 1d4a1adbed25 ("i2c: xiic: Try re-initialization on bus busy timeout")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-xiic.c