linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Ray Jui <ray.jui@broadcom.com>
Cc: Dhananjay Phadke <dphadke@linux.microsoft.com>,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ray Jui <rjui@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH] i2c: iproc: fix race between client unreg and isr
Date: Wed, 22 Jul 2020 12:41:28 +0200	[thread overview]
Message-ID: <20200722104128.GK1030@ninjato> (raw)
In-Reply-To: <116ac90c-8b49-ca89-90a4-9a28f43a7c50@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]


> > +	synchronize_irq(iproc_i2c->irq);
> 
> If one takes a look at the I2C slave ISR routine, there are places where
> IRQ can be re-enabled in the ISR itself. What happens after we mask all
> slave interrupt and when 'synchronize_irq' is called, which I suppose is
> meant to wait for inflight interrupt to finish where there's a chance
> the interrupt can be re-enable again? How is one supposed to deal with that?

I encountered the same problem with the i2c-rcar driver before I left
for my holidays.

> > +	iproc_i2c->slave = NULL;
> > +
> >  	/* Erase the slave address programmed */
> >  	tmp = iproc_i2c_rd_reg(iproc_i2c, S_CFG_SMBUS_ADDR_OFFSET);
> >  	tmp &= ~BIT(S_CFG_EN_NIC_SMB_ADDR3_SHIFT);
> > 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-22 10:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 23:39 [PATCH] i2c: iproc: fix race between client unreg and isr Dhananjay Phadke
2020-07-19  7:59 ` Rayagonda Kokatanur
2020-07-20 17:40   ` Scott Branden
2020-07-20 17:49 ` Ray Jui
2020-07-22 10:41   ` Wolfram Sang [this message]
2020-07-22 15:51     ` Ray Jui
2020-07-22 16:55       ` Ray Jui
2020-07-23  0:58       ` Dhananjay Phadke
2020-07-25 10:18       ` Wolfram Sang
2020-07-27  4:32         ` Rayagonda Kokatanur
2020-07-27 15:42         ` Ray Jui
2020-07-27 17:38           ` Dhananjay Phadke
2020-07-27 18:13           ` Wolfram Sang
2020-07-27 20:26             ` Wolfram Sang
2020-07-27 20:43               ` Ray Jui
2020-08-05  9:17                 ` Wolfram Sang
2020-08-07 16:40                   ` Ray Jui
2020-08-07 17:38                     ` Dhananjay Phadke

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=20200722104128.GK1030@ninjato \
    --to=wsa@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dphadke@linux.microsoft.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.jui@broadcom.com \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=rjui@broadcom.com \
    /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).