Patch "i2c: xiic: Fix RX IRQ busy check" has been added to the 5.10-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: xiic: Fix RX IRQ busy check

to the 5.10-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-xiic-fix-rx-irq-busy-check.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 07f23f62b9a1af2207d890e77715241dc12ffe7a
Author: Marek Vasut <marex@xxxxxxx>
Date:   Mon Aug 23 23:41:45 2021 +0200

    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@xxxxxxx>
    Acked-by: Michal Simek <michal.simek@xxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
    Stable-dep-of: 1d4a1adbed25 ("i2c: xiic: Try re-initialization on bus busy timeout")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index c6447b2769f9d..b91ea900aae3a 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -545,7 +545,7 @@ static int xiic_busy(struct xiic_i2c *i2c)
 	int tries = 3;
 	int err;
 
-	if (i2c->tx_msg)
+	if (i2c->tx_msg || i2c->rx_msg)
 		return -EBUSY;
 
 	/* In single master mode bus can only be busy, when in use by this




[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