Patch "i2c: cadence: Avoid fifo clear after start" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i2c: cadence: Avoid fifo clear after start

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i2c-cadence-avoid-fifo-clear-after-start.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit abbfa6ff114dcafc4f73e3c4872b3761080e6496
Author: Sai Pavan Boddu <sai.pavan.boddu@xxxxxxx>
Date:   Fri May 3 15:12:08 2024 +0530

    i2c: cadence: Avoid fifo clear after start
    
    [ Upstream commit c2e55b449de7298a751ed0256251019d302af453 ]
    
    The Driver unintentionally programs ctrl reg to clear the fifo, which
    happens after the start of transaction. Previously, this was not an issue
    as it involved read-modified-write. However, this issue breaks i2c reads
    on QEMU, as i2c-read is executed before guest starts programming control
    register.
    
    Fixes: ff0cf7bca630 ("i2c: cadence: Remove unnecessary register reads")
    Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xxxxxxx>
    Acked-by: Michal Simek <michal.simek@xxxxxxx>
    Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index de3f58b60dce5..6f7d753a8197c 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -633,6 +633,7 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)
 
 	if (hold_clear) {
 		ctrl_reg &= ~CDNS_I2C_CR_HOLD;
+		ctrl_reg &= ~CDNS_I2C_CR_CLR_FIFO;
 		/*
 		 * In case of Xilinx Zynq SOC, clear the HOLD bit before transfer size
 		 * register reaches '0'. This is an IP bug which causes transfer size




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux