i2c: testunit: discard write requests while old command is running
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 27 Jun 2024 11:14:48 +0000 (13:14 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 28 Jun 2024 18:44:38 +0000 (20:44 +0200)
commitc116deafd1a5cc1e9739099eb32114e90623209c
tree47bc3d206cedf276a726c0144ed65c0e4e63d68d
parentc422b6a630240f706063e0ecbb894aa8491b1fa1
i2c: testunit: discard write requests while old command is running

When clearing registers on new write requests was added, the protection
for currently running commands was missed leading to concurrent access
to the testunit registers. Check the flag beforehand.

Fixes: b39ab96aa894 ("i2c: testunit: add support for block process calls")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/i2c-slave-testunit.c