From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Shawn Nematbakhsh <shawnn@google.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Julius Werner <jwerner@chromium.org>
Subject: Re: [PATCH] usb: xhci: Disable runtime PM suspend for quirky controllers.
Date: Tue, 28 May 2013 13:58:42 -0700 [thread overview]
Message-ID: <20130528205842.GE32085@xanatos> (raw)
In-Reply-To: <CALaWCOOGEDtF1z29df2ST9kV-VpMa9VbvFK0Hh71WJG5f_pngA@mail.gmail.com>
On Sat, May 25, 2013 at 09:57:57AM -0700, Shawn Nematbakhsh wrote:
> Hi Sarah and Alan,
>
> Thanks for the comments. I will make the following revisions:
>
> 1. Call pm_runtime_get_noresume only when the first device is connected,
> and call pm_runtime_put when the last device is disconnected.
> 2. Wrap the calls in an ifdef CONFIG_USB_DEFAULT_PERSIST.
> 3. Make sure that all pm_runtime_get_noresume calls have a corresponding
> pm_runtime_put somewhere (originally the intent was to disable runtime
> suspend "forever", but no longer).
>
> In principle, would the patch be acceptable with these revisions?
Maybe, but I still don't like this approach, because it's too
heavy-handed.
I was considering whether userspace could do something similar to this
approach, but with udev rules instead of within the kernel. You could
add a udev rule to trigger on USB device insertion, that would disable
runtime PM for the host, and a corresponding rule that re-enabled
runtime PM when the last USB device was disconnected.
I think it could be possible if userspace can get to the DMI information
for the system. However, then we open the other can of worms by needing
to keep the userspace quirks list in sync with the kernel quirks list.
What if we exposed the xHCI quirks through a new quirks file in
/sys/bus/usb/devices/usbN/? That would mean userspace doesn't need to
keep the quirks list separately.
Sarah Sharp
next prev parent reply other threads:[~2013-05-28 20:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 18:12 [PATCH] usb: xhci: Disable runtime PM suspend for quirky controllers Shawn Nematbakhsh
2013-05-24 21:05 ` Sarah Sharp
2013-05-25 14:11 ` Alan Stern
2013-05-25 16:59 ` Shawn Nematbakhsh
[not found] ` <CALaWCOOGEDtF1z29df2ST9kV-VpMa9VbvFK0Hh71WJG5f_pngA@mail.gmail.com>
2013-05-28 20:58 ` Sarah Sharp [this message]
2013-05-28 21:41 ` Julius Werner
2013-05-29 14:23 ` Alan Stern
2013-05-29 19:38 ` Sarah Sharp
2013-05-29 20:11 ` Alan Stern
2013-05-29 20:32 ` Don Zickus
2013-06-03 11:33 ` Oliver Neukum
2013-08-09 17:22 ` Sarah Sharp
2013-08-12 15:49 ` Shawn Nematbakhsh
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=20130528205842.GE32085@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shawnn@google.com \
--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