Patch "i2c: designware: must wait for enable" has been added to the 4.14-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
i2c: designware: must wait for enable
to the 4.14-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-designware-must-wait-for-enable.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
fba4adbbf670577e605f9ad306629db6031cd48bMon Sep 17 00:00:00 2001
From: Ben Gardner <[email protected]>
Date: Wed, 14 Feb 2018 09:29:52 -0600
Subject: i2c: designware: must wait for enable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ben Gardner <[email protected]>
commit fba4adbbf670577e605f9ad306629db6031cd48b upstream.
One I2C bus on my Atom E3845 board has been broken since 4.9. It has two devices, both declared by ACPI and with built-in drivers.
There are two back-to-back transactions originating from the kernel, one targeting each device. The first transaction works, the second one locks up the I2C controller. The controller never recovers.
These kernel logs show up whenever an I2C transaction is attempted after this failure.
i2c-designware-pci 0000:00:18.3: timeout in disabling adapter i2c-designware-pci 0000:00:18.3: timeout waiting for bus ready
Waiting for the I2C controller status to indicate that it is enabled before programming it fixes the issue.
I have tested this patch on 4.14 and 4.15.
--- drivers/i2c/busses/i2c-designware-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-master.c +1 -1
@@ -207,7 +207,7 @@ static void i2c_dw_xfer_init(struct dw_ii2c_dw_disable_int (dev);/* Enable the adapter */ -__i2c_dw_enable (dev, true); +__i2c_dw_enable_and_wait (dev, true);/* Clear and enable interrupts */ dw_readl (dev,DW_IC_CLR_INTR );
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/i2c-designware-must-wait-for-enable.patch