LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>,
	bhelgaas@google.com, rafael.j.wysocki@intel.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v4] PCI / PM: Always check PME wakeup capability for runtime wakeup support
Date: Wed, 09 May 2018 00:14:22 +0200	[thread overview]
Message-ID: <11148593.jpbL9ipGSX@aspire.rjw.lan> (raw)
In-Reply-To: <20180507214817.GC133147@bhelgaas-glaptop.roam.corp.google.com>

On Monday, May 7, 2018 11:48:17 PM CEST Bjorn Helgaas wrote:
> On Mon, May 07, 2018 at 02:11:20PM +0800, Kai-Heng Feng wrote:
> > USB controller ASM1042 stops working after commit de3ef1eb1cd0 ("PM /
> > core: Drop run_wake flag from struct dev_pm_info").
> > 
> > The device in question is not power managed by platform firmware,
> > furthermore, it only supports PME# from D3cold:
> > Capabilities: [78] Power Management version 3
> >        Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot-,D3cold+)
> >        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> > 
> > Before commit de3ef1eb1cd0, the device never gets runtime suspended.
> > After that commit, the device gets runtime suspended to D3hot, which can
> > not generate any PME#.
> > 
> > usb_hcd_pci_probe() unconditionally calls device_wakeup_enable(), hence
> > device_can_wakeup() in pci_dev_run_wake() always returns true.
> > 
> > So pci_dev_run_wake() needs to check PME wakeup capability as its first
> > condition.
> > 
> > In addition, change wakeup flag passed to pci_target_state() from false
> > to true, because we want to find the deepest state that the device can
> > still generate PME#. In this case, it's D0 for the device in question.
> > 
> > Fixes: de3ef1eb1cd0 ("PM / core: Drop run_wake flag from struct dev_pm_info")
> > Cc: stable@vger.kernel.org # 4.13+
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> Rafael, can you queue this up?  de3ef1eb1cd0 went through your tree,
> and I don't really understand the patch, so I'll rely on your review.

I will, thanks!

      reply	other threads:[~2018-05-08 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  6:11 Kai-Heng Feng
2018-05-07 21:48 ` Bjorn Helgaas
2018-05-08 22:14   ` Rafael J. Wysocki [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=11148593.jpbL9ipGSX@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.kernel.org \
    --subject='Re: [PATCH v4] PCI / PM: Always check PME wakeup capability for runtime wakeup support' \
    /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

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).