LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Kai Heng Feng <kai.heng.feng@canonical.com>
Cc: Rafael Wysocki <rafael.j.wysocki@intel.com>,
	linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH] PCI / PM: Don't runtime suspend when device only supports wakeup from D0
Date: Wed, 22 May 2019 13:11:57 -0500	[thread overview]
Message-ID: <20190522181157.GC79339@google.com> (raw)
In-Reply-To: <D5DC20F1-6B8F-466F-BAE7-65F0C8FB3D1D@canonical.com>

On Wed, May 22, 2019 at 11:46:25PM +0800, Kai Heng Feng wrote:
> > On May 22, 2019, at 9:48 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Wed, May 22, 2019 at 11:42:14AM +0800, Kai Heng Feng wrote:
> >> at 6:23 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >>> On Wed, May 22, 2019 at 12:31:04AM +0800, Kai-Heng Feng wrote:
> >>>> There's an xHC device that doesn't wake when a USB device gets plugged
> >>>> to its USB port. The driver's own runtime suspend callback was called,
> >>>> PME signaling was enabled, but it stays at PCI D0.

> > ...
> > And I guess this patch basically means we wouldn't call the driver's
> > suspend callback if we're merely going to stay at D0, so the driver
> > would have no idea anything happened.  That might match
> > Documentation/power/pci.txt better, because it suggests that the
> > suspend callback is related to putting a device in a low-power state,
> > and D0 is not a low-power state.
> 
> Yes, the patch is to let the device stay at D0 and don’t run driver’s own
> runtime suspend routine.
> 
> I guess I’ll just proceed to send a V2 with updated commit message?

Now that I understand what "runtime suspended to D0" means, help me
understand what's actually wrong.

The PCI core apparently *does* enable PME when we "suspend to D0".
But somehow calling the xHCI runtime suspend callback makes the driver
unable to notice when the PME is signaled?

Bjorn

  reply	other threads:[~2019-05-22 18:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 16:31 Kai-Heng Feng
2019-05-21 22:23 ` Bjorn Helgaas
2019-05-22  3:42   ` Kai Heng Feng
2019-05-22 13:48     ` Bjorn Helgaas
2019-05-22 15:46       ` Kai Heng Feng
2019-05-22 18:11         ` Bjorn Helgaas [this message]
2019-05-22 18:39           ` Alan Stern
2019-05-22 18:53             ` Lukas Wunner
2019-05-22 19:05               ` Kai Heng Feng
2019-05-22 20:52             ` Bjorn Helgaas
2019-05-23  4:39               ` Kai-Heng Feng
2019-05-27 16:57                 ` Bjorn Helgaas
2019-06-05 11:57                   ` Bjorn Helgaas
2019-07-05  7:02                     ` Kai-Heng Feng
2019-07-05  9:39                       ` Rafael J. Wysocki
2019-07-05 13:51                         ` Kai-Heng Feng
2019-07-09 13:45                       ` Bjorn Helgaas
2019-09-02 13:47                         ` Kai-Heng Feng

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=20190522181157.GC79339@google.com \
    --to=helgaas@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --subject='Re: [PATCH] PCI / PM: Don'\''t runtime suspend when device only supports wakeup from D0' \
    /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).