From: Lukas Wunner <lukas@wunner.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org,
Andreas Noever <andreas.noever@gmail.com>,
Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [RFC 4/4] thunderbolt: Support runtime pm
Date: Fri, 13 May 2016 14:10:29 +0200 [thread overview]
Message-ID: <20160513121029.GA22994@wunner.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1603171042520.2097-100000@iolanthe.rowland.org>
Hi Alan,
On Thu, Mar 17, 2016 at 10:54:55AM -0400, Alan Stern wrote:
> On Wed, 16 Mar 2016, Lukas Wunner wrote:
> > > The way you're doing it, how does the NHI driver know when to go into
> > > suspend? The runtime PM core won't notify it when all the hotplugged
> > > devices attached to the other bridges have been suspended, since it's
> > > not their parent.
> >
> > The NHI knows when something is plugged in, it talks to the switches
> > in devices that are hotplugged to the controller. As I've explained
> > in the lengthy comment in the middle of patch [4/4], we acquire a
> > runtime pm ref for each switch that is plugged in and release one
> > whenever a switch is unplugged.
>
> If I understand correctly, that means you allow the Thunderbolt
> controller to go into runtime suspend only when nothing is plugged into
> any of the ports. Is that right? It's quite inefficient.
In the case of Thunderbolt on the Mac, runtime suspend means that the
controller is powered down. A plug event is side-band signaled using a GPE
so that we're able to power the controller up once something is plugged in.
It's not possible to power the controller down while devices are attached
because downstream devices have no way to side-band signal an interrupt
when they need to send data to the controller.
> What I'm getting at is that we should have proper runtime-PM support
> for bridges, i.e., I agree with what you wrote above. A bridge can
> safely go into runtime suspend when there are no unsuspended devices
> attached to any of its downstream ports. (That's how the USB hub
> driver works, for instance.) Doing things that way would make
> everything simpler in the long run.
>
> So my suggestion is that you change over to the "less kludgy solution"
> and work on that instead.
Alright, posted as v2 today. :-)
Thanks,
Lukas
next prev parent reply other threads:[~2016-05-13 12:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 14:50 [RFC 0/4] Runtime pm for thunderbolt.ko Lukas Wunner
2016-03-16 14:50 ` [RFC 3/4] thunderbolt: Move pm code to separate file Lukas Wunner
2016-03-16 14:50 ` [RFC 1/4] PCI: Add Thunderbolt device IDs Lukas Wunner
2016-03-17 15:03 ` Bjorn Helgaas
2016-03-20 13:11 ` Lukas Wunner
2016-03-20 17:12 ` Greg Kroah-Hartman
2016-04-05 23:27 ` Bjorn Helgaas
2016-04-07 22:42 ` Andreas Noever
2016-03-16 14:50 ` [RFC 4/4] thunderbolt: Support runtime pm Lukas Wunner
2016-03-16 15:26 ` Alan Stern
2016-03-16 16:20 ` Lukas Wunner
2016-03-17 14:54 ` Alan Stern
2016-05-13 12:10 ` Lukas Wunner [this message]
2016-03-20 13:53 ` Andreas Noever
2016-04-24 15:23 ` Lukas Wunner
2016-05-01 11:18 ` Andreas Noever
2016-03-16 14:50 ` [RFC 2/4] thunderbolt: Fix typos and magic number Lukas Wunner
2016-03-20 13:54 ` Andreas Noever
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=20160513121029.GA22994@wunner.de \
--to=lukas@wunner.de \
--cc=andreas.noever@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=stern@rowland.harvard.edu \
/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).