diff mbox series

[2/3] i2c: amd-asf: Set cmd variable when encountering an error

Message ID 20250217090258.398540-2-Shyam-sundar.S-k@amd.com
State New
Headers show
Series [1/3] i2c: amd-asf: Modify callbacks of i2c_algorithm to align with the latest revision | expand

Commit Message

Shyam Sundar S K Feb. 17, 2025, 9:02 a.m. UTC
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>
---
 drivers/i2c/busses/i2c-amd-asf-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Shyti Feb. 18, 2025, 10:31 p.m. UTC | #1
Hi Shyam,

On Mon, Feb 17, 2025 at 02:32:57PM +0530, Shyam Sundar S K wrote:
> 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>

merged to i2c/i2c-host.

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c
index f107d80afcc1..438db5a9d0ed 100644
--- a/drivers/i2c/busses/i2c-amd-asf-plat.c
+++ b/drivers/i2c/busses/i2c-amd-asf-plat.c
@@ -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 {