From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: "Yu, Xiangliang" <Xiangliang.Yu@amd.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"wsa@the-dreams.de" <wsa@the-dreams.de>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Xue, Ken" <Ken.Xue@amd.com>,
"Wan, Vincent" <Vincent.Wan@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
"Wang, Annie" <Annie.Wang@amd.com>, "Li, Tony" <Tony.Li@amd.com>
Subject: Re: [PATCH 1/1] I2C: designware: fix IO timeout issue for AMD controller
Date: Fri, 06 Nov 2015 10:59:35 +0200 [thread overview]
Message-ID: <563C6BF7.3080406@linux.intel.com> (raw)
In-Reply-To: <1C99EED8F51BBC41A8F1E645B51245F41AE8AA50@scybexdag03.amd.com>
On 06.11.2015 06:34, Yu, Xiangliang wrote:
>> -----Original Message-----
>> From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com]
>>> --- a/drivers/i2c/busses/i2c-designware-core.c
>>> +++ b/drivers/i2c/busses/i2c-designware-core.c
>>> @@ -783,6 +783,9 @@ irqreturn_t i2c_dw_isr(int this_irq, void *dev_id)
>>>
>>> stat = i2c_dw_read_clear_intrbits(dev);
>>
>> What if the status changes right here, before you go and mask the interrupt?
> Have no effect, because i2c controller can't trigger next interrupt.
>
Does it mean possible lost interrupt too? I guess it can be debugged by
placing a few ms long mdelay() between clearing and masking.
How frequent is this timeout? I guess lost interrupt is somehow nearly
related to clearing, masking and unmasking if that cycle helps. One
thing that comes to my mind is masking needed and could plain unmasking
be also a working workaround?
Have you tried to print DW_IC_INTR_STAT, DW_IC_INTR_MASK and
DW_IC_RAW_INTR_STAT when timeout occurs? E.g. just after printing the
timeout out error in i2c_dw_xfer(). Probably good in i2c_dw_isr() too if
if doesn't produce too much data and make debugging impossible.
--
Jarkko
next prev parent reply other threads:[~2015-11-06 8:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 12:34 [PATCH 1/1] I2C: designware: fix IO timeout issue for AMD controller Xiangliang Yu
2015-11-05 13:52 ` Mika Westerberg
2015-11-06 4:34 ` Yu, Xiangliang
2015-11-06 7:46 ` Mika Westerberg
2015-11-06 8:33 ` Yu, Xiangliang
2015-12-01 0:43 ` Wolfram Sang
2015-11-06 8:59 ` Jarkko Nikula [this message]
2015-11-06 9:11 ` Yu, Xiangliang
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=563C6BF7.3080406@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Annie.Wang@amd.com \
--cc=Ken.Xue@amd.com \
--cc=Ray.Huang@amd.com \
--cc=Tony.Li@amd.com \
--cc=Vincent.Wan@amd.com \
--cc=Xiangliang.Yu@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).