]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 May 2023 06:51:50 +0000 (15:51 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 May 2023 06:51:50 +0000 (15:51 +0900)
added patches:
i2c-omap-fix-standard-mode-false-ack-readings.patch

queue-5.4/i2c-omap-fix-standard-mode-false-ack-readings.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/i2c-omap-fix-standard-mode-false-ack-readings.patch b/queue-5.4/i2c-omap-fix-standard-mode-false-ack-readings.patch
new file mode 100644 (file)
index 0000000..fb8ac37
--- /dev/null
@@ -0,0 +1,37 @@
+From c770657bd2611b077ec1e7b1fe6aa92f249399bd Mon Sep 17 00:00:00 2001
+From: Reid Tonking <reidt@ti.com>
+Date: Wed, 26 Apr 2023 14:49:56 -0500
+Subject: i2c: omap: Fix standard mode false ACK readings
+
+From: Reid Tonking <reidt@ti.com>
+
+commit c770657bd2611b077ec1e7b1fe6aa92f249399bd upstream.
+
+Using standard mode, rare false ACK responses were appearing with
+i2cdetect tool. This was happening due to NACK interrupt triggering
+ISR thread before register access interrupt was ready. Removing the
+NACK interrupt's ability to trigger ISR thread lets register access
+ready interrupt do this instead.
+
+Cc: <stable@vger.kernel.org> # v3.7+
+Fixes: 3b2f8f82dad7 ("i2c: omap: switch to threaded IRQ support")
+Signed-off-by: Reid Tonking <reidt@ti.com>
+Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
+Reviewed-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-omap.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-omap.c
++++ b/drivers/i2c/busses/i2c-omap.c
+@@ -1058,7 +1058,7 @@ omap_i2c_isr(int irq, void *dev_id)
+       u16 stat;
+       stat = omap_i2c_read_reg(omap, OMAP_I2C_STAT_REG);
+-      mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG);
++      mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG) & ~OMAP_I2C_STAT_NACK;
+       if (stat & mask)
+               ret = IRQ_WAKE_THREAD;
index 0221b357540e6066a25bf40a8e99083e32540ed8..ae1dd6460de2d82f3e04a09f459c6faab1efc8a2 100644 (file)
@@ -25,3 +25,4 @@ crypto-api-demote-bug_on-in-crypto_unregister_alg-to-a-warn_on.patch
 crypto-safexcel-cleanup-ring-irq-workqueues-on-load-failure.patch
 reiserfs-add-security-prefix-to-xattr-name-in-reiserfs_security_write.patch
 kvm-nvmx-emulate-nops-in-l2-and-pause-if-it-s-not-intercepted.patch
+i2c-omap-fix-standard-mode-false-ack-readings.patch