mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: "Westerberg, Mika" <mika.westerberg@intel.com>
Cc: "Du, Wenkai" <wenkai.du@intel.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable
Date: Sun, 6 Apr 2014 18:58:18 +0100	[thread overview]
Message-ID: <20140406185818.3aaca03d@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <20140405061316.GF19349@intel.com>

On Sat, 5 Apr 2014 09:13:16 +0300
"Westerberg, Mika" <mika.westerberg@intel.com> wrote:

> On Sat, Apr 05, 2014 at 12:54:33AM +0300, Du, Wenkai wrote:
> > >Interrupt masking is done already after each transaction.
> > 
> > At end of transfer, the code uses __i2c_dw_enable(dev, false) to disable
> > adapter. This function doesn't mask interrupts. There is another function
> > i2c_dw_disable that masks and clears interrupts. This could be used, but
> > that means we need to fix in 2 places: 
> 
> Please check i2c_dw_isr() and tell me in which code path interrupts are not
> getting masked. Or am I missing something fundamental here?
> 
> In case of abort, we mask interrupts. Also whenever the transaction
> completes we mask interrupts (in i2c_dw_xfer_msg()).

Well actually you mask the IRQ at some point after the function returns
if the bus allows the write to be posted. As i2c_dw_isr can then exit the
IRQ handler before the write completes I suspect you have a race ?

Alan

  reply	other threads:[~2014-04-06 17:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 17:05 Du, Wenkai
2014-04-04 18:16 ` Westerberg, Mika
2014-04-04 18:20   ` Du, Wenkai
2014-04-04 18:42     ` Westerberg, Mika
2014-04-04 21:54       ` Du, Wenkai
2014-04-05  6:13         ` Westerberg, Mika
2014-04-06 17:58           ` One Thousand Gnomes [this message]
2014-04-07  9:04             ` Westerberg, Mika
2014-04-07 14:42               ` One Thousand Gnomes
2014-04-07 15:11                 ` Westerberg, Mika
2014-04-07 16:48                   ` Du, Wenkai
2014-04-08 10:30                     ` Westerberg, Mika
2014-04-09 23:45                       ` Du, Wenkai
2014-04-10  9:08                         ` Westerberg, Mika
2014-04-10 23:06                           ` Du, Wenkai

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=20140406185818.3aaca03d@alan.etchedpixels.co.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@intel.com \
    --cc=wenkai.du@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

Powered by JetHome