All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	Lukas Wunner <lukas@wunner.de>, Imre Deak <imre.deak@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/LINK: Disable bandwidth notification interrupt during suspend
Date: Thu, 18 Apr 2019 18:24:11 -0500	[thread overview]
Message-ID: <20190418232411.GE126710@google.com> (raw)
In-Reply-To: <20190415084142.30897-1-mika.westerberg@linux.intel.com>

On Mon, Apr 15, 2019 at 11:41:42AM +0300, Mika Westerberg wrote:
> If the bandwidth notification interrupt is left unmasked when entering
> suspend to idle it triggers immediately bringing the system back to
> working state.
> 
> To keep that from happening, disable the interrupt when entering system
> sleep and enable it again during resume.
> 
> Reported-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Applied to pci/portdrv for v5.2, thanks, Mika.

> ---
>  drivers/pci/pcie/bw_notification.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/pci/pcie/bw_notification.c b/drivers/pci/pcie/bw_notification.c
> index 4fa9e3523ee1..77e685771487 100644
> --- a/drivers/pci/pcie/bw_notification.c
> +++ b/drivers/pci/pcie/bw_notification.c
> @@ -107,11 +107,25 @@ static void pcie_bandwidth_notification_remove(struct pcie_device *srv)
>  	free_irq(srv->irq, srv);
>  }
>  
> +static int pcie_bandwidth_notification_suspend(struct pcie_device *srv)
> +{
> +	pcie_disable_link_bandwidth_notification(srv->port);
> +	return 0;
> +}
> +
> +static int pcie_bandwidth_notification_resume(struct pcie_device *srv)
> +{
> +	pcie_enable_link_bandwidth_notification(srv->port);
> +	return 0;
> +}
> +
>  static struct pcie_port_service_driver pcie_bandwidth_notification_driver = {
>  	.name		= "pcie_bw_notification",
>  	.port_type	= PCIE_ANY_PORT,
>  	.service	= PCIE_PORT_SERVICE_BWNOTIF,
>  	.probe		= pcie_bandwidth_notification_probe,
> +	.suspend	= pcie_bandwidth_notification_suspend,
> +	.resume		= pcie_bandwidth_notification_resume,
>  	.remove		= pcie_bandwidth_notification_remove,
>  };
>  
> -- 
> 2.20.1
> 

      reply	other threads:[~2019-04-18 23:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  8:41 [PATCH] PCI/LINK: Disable bandwidth notification interrupt during suspend Mika Westerberg
2019-04-18 23:24 ` Bjorn Helgaas [this message]

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=20190418232411.GE126710@google.com \
    --to=helgaas@kernel.org \
    --cc=imre.deak@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mr.nuke.me@gmail.com \
    --cc=rjw@rjwysocki.net \
    /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.