All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Alifer Moraes <alifer.m@variscite.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, eran.m@variscite.com,
	festevam@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com,
	linux-i2c@vger.kernel.org, linux@rempel-privat.de,
	pierluigi.p@variscite.com, s.hauer@pengutronix.de,
	shawnguo@kernel.org, gaopan <b54642@freescale.com>,
	Fugang Duan <B38611@freescale.com>,
	Vipul Kumar <vipul_kumar@mentor.com>
Subject: Re: (EXT) [PATCH] i2c: imx: add irqf_no_suspend
Date: Sat, 21 May 2022 12:24:16 +0200	[thread overview]
Message-ID: <Yoi90G5cphagcxpp@shikoro> (raw)
In-Reply-To: <3676803.kQq0lBPeGt@steina-w>

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

Hi everyone,

> > The i2c irq is masked when pcie starts a i2c transfer process
> > during noirq suspend stage. As a result, i2c transfer fails.
> > To solve the problem, IRQF_NO_SUSPEND is added to i2c bus.
> > 
> > Signed-off-by: Gao Pan <b54642@freescale.com>
> > Signed-off-by: Fugang Duan <B38611@freescale.com>
> > Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>

The SoB from Alifer Moraes is missing, too.

> > goto rpm_disable;
> > 
> >  	/* Request IRQ */
> > -	ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
> > +	ret = request_threaded_irq(irq, i2c_imx_isr, NULL,
> > +				   IRQF_SHARED | IRQF_NO_SUSPEND,
> >  				   pdev->name, i2c_imx);
> >  	if (ret) {
> >  		dev_err(&pdev->dev, "can't claim irq %d\n", irq);
> 
> 
> I stumbled across Documentation/power/suspend-and-interrupts.rst which states:
> > For this reason, using IRQF_NO_SUSPEND and IRQF_SHARED at the
> > same time should be avoided.
> Given this IMHO at least a comment should be inserted why this is fine. I dont 
> have a full picture about the situation, but to me it seems there is a 
> reference missing, or why/how does some PCIe start some I2C transfer when the
> controller is suspended already? Do I miss something?

Thank you for this comment, Alexander. I second you, this needs
explanation.

Happy hacking,

   Wolfram


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

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@kernel.org>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Alifer Moraes <alifer.m@variscite.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, eran.m@variscite.com,
	festevam@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com,
	linux-i2c@vger.kernel.org, linux@rempel-privat.de,
	pierluigi.p@variscite.com, s.hauer@pengutronix.de,
	shawnguo@kernel.org, gaopan <b54642@freescale.com>,
	Fugang Duan <B38611@freescale.com>,
	Vipul Kumar <vipul_kumar@mentor.com>
Subject: Re: (EXT) [PATCH] i2c: imx: add irqf_no_suspend
Date: Sat, 21 May 2022 12:24:16 +0200	[thread overview]
Message-ID: <Yoi90G5cphagcxpp@shikoro> (raw)
In-Reply-To: <3676803.kQq0lBPeGt@steina-w>


[-- Attachment #1.1: Type: text/plain, Size: 1371 bytes --]

Hi everyone,

> > The i2c irq is masked when pcie starts a i2c transfer process
> > during noirq suspend stage. As a result, i2c transfer fails.
> > To solve the problem, IRQF_NO_SUSPEND is added to i2c bus.
> > 
> > Signed-off-by: Gao Pan <b54642@freescale.com>
> > Signed-off-by: Fugang Duan <B38611@freescale.com>
> > Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>

The SoB from Alifer Moraes is missing, too.

> > goto rpm_disable;
> > 
> >  	/* Request IRQ */
> > -	ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
> > +	ret = request_threaded_irq(irq, i2c_imx_isr, NULL,
> > +				   IRQF_SHARED | IRQF_NO_SUSPEND,
> >  				   pdev->name, i2c_imx);
> >  	if (ret) {
> >  		dev_err(&pdev->dev, "can't claim irq %d\n", irq);
> 
> 
> I stumbled across Documentation/power/suspend-and-interrupts.rst which states:
> > For this reason, using IRQF_NO_SUSPEND and IRQF_SHARED at the
> > same time should be avoided.
> Given this IMHO at least a comment should be inserted why this is fine. I dont 
> have a full picture about the situation, but to me it seems there is a 
> reference missing, or why/how does some PCIe start some I2C transfer when the
> controller is suspended already? Do I miss something?

Thank you for this comment, Alexander. I second you, this needs
explanation.

Happy hacking,

   Wolfram


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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-21 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 14:36 [PATCH] i2c: imx: add irqf_no_suspend Alifer Moraes
2022-03-07 14:36 ` Alifer Moraes
2022-03-11  9:01 ` Oleksij Rempel
2022-03-11  9:01   ` Oleksij Rempel
2022-03-11 10:57 ` (EXT) " Alexander Stein
2022-03-11 10:57   ` Alexander Stein
2022-05-21 10:24   ` Wolfram Sang [this message]
2022-05-21 10:24     ` Wolfram Sang

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=Yoi90G5cphagcxpp@shikoro \
    --to=wsa@kernel.org \
    --cc=B38611@freescale.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=alifer.m@variscite.com \
    --cc=b54642@freescale.com \
    --cc=eran.m@variscite.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=pierluigi.p@variscite.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=vipul_kumar@mentor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.