]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i2c: amd-asf: Set cmd variable when encountering an error
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Mon, 17 Feb 2025 09:02:57 +0000 (14:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:35 +0000 (11:12 +0200)
[ Upstream commit b719afaa1e5d88a1b51d76adf344ff4a48efdb45 ]

In the event of ASF error during the transfer, update the cmd and exit
the process, as data processing is not performed when a command fails.

Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250217090258.398540-2-Shyam-sundar.S-k@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-amd-asf-plat.c

index 93ebec162c6ddb3bcac0e9fada306e8261664184..61bc714c28d70b64043424b820da98d2e31b5831 100644 (file)
@@ -69,7 +69,7 @@ static void amd_asf_process_target(struct work_struct *work)
        /* Check if no error bits are set in target status register */
        if (reg & ASF_ERROR_STATUS) {
                /* Set bank as full */
-               cmd = 0;
+               cmd = 1;
                reg |= GENMASK(3, 2);
                outb_p(reg, ASFDATABNKSEL);
        } else {