Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "gardner.ben@gmail.com" <gardner.ben@gmail.com>,
	"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Cc: "mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] i2c: designware: must wait for enable
Date: Wed, 21 Feb 2018 01:14:31 +0000	[thread overview]
Message-ID: <1519175597.4483.6.camel@intel.com> (raw)
In-Reply-To: <1518622192-19700-1-git-send-email-gardner.ben@gmail.com>

LGTM

On Wed, 2018-02-14 at 09:29 -0600, Ben Gardner wrote:
> 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 <stable@vger.kernel.org> #4.13+
> Cc: José Roberto de Souza <jose.souza@intel.com>

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
> ---
>  drivers/i2c/busses/i2c-designware-master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-master.c
> b/drivers/i2c/busses/i2c-designware-master.c
> index ae69188..55926ef 100644
> --- a/drivers/i2c/busses/i2c-designware-master.c
> +++ b/drivers/i2c/busses/i2c-designware-master.c
> @@ -209,7 +209,7 @@ static void i2c_dw_xfer_init(struct dw_i2c_dev
> *dev)
>  	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);

  parent reply	other threads:[~2018-02-21  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 15:29 [PATCH] i2c: designware: must wait for enable Ben Gardner
2018-02-15 11:06 ` Jarkko Nikula
2018-02-21  1:14 ` Souza, Jose [this message]
2018-02-21  8:16 ` Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2018-02-27 12:06 Jarkko Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519175597.4483.6.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gardner.ben@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox