From: Greg Kroah-Hartman Date: Wed, 28 Feb 2018 14:19:02 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v3.18.98~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eebf8b4315a62d830ababdad4b539973657fd851;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: i2c-designware-must-wait-for-enable.patch --- diff --git a/queue-4.9/i2c-designware-must-wait-for-enable.patch b/queue-4.9/i2c-designware-must-wait-for-enable.patch new file mode 100644 index 00000000000..8e012a44d8e --- /dev/null +++ b/queue-4.9/i2c-designware-must-wait-for-enable.patch @@ -0,0 +1,54 @@ +From fba4adbbf670577e605f9ad306629db6031cd48b Mon Sep 17 00:00:00 2001 +From: Ben Gardner +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 + +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. + +Fixes: commit 2702ea7dbec5 ("i2c: designware: wait for disable/enable only if necessary") +Cc: linux-stable #4.13+ +Signed-off-by: Ben Gardner +Acked-by: Jarkko Nikula +Reviewed-by: José Roberto de Souza +Signed-off-by: Wolfram Sang +Signed-off-by: Ben Gardner +[Jarkko: Backported to v4.9..v4.12 before i2c-designware-core.c was renamed to i2c-designware-master.c] +Signed-off-by: Jarkko Nikula +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-designware-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-designware-core.c ++++ b/drivers/i2c/busses/i2c-designware-core.c +@@ -507,7 +507,7 @@ static void i2c_dw_xfer_init(struct dw_i + i2c_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); diff --git a/queue-4.9/series b/queue-4.9/series index abaef70c6f0..c3bf5a8633d 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1 +1,2 @@ hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch +i2c-designware-must-wait-for-enable.patch