All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Oliver Neukum <oneukum@suse.de>
Cc: jkosina@suse.cz, linux-usb@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] usbhid: correct PM failure with closed devices
Date: Wed, 15 Apr 2015 10:56:33 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1504151042140.1404-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1429103925-31304-1-git-send-email-oneukum@suse.de>

On Wed, 15 Apr 2015, Oliver Neukum wrote:

> When usbhid closes a device which was awake only because remote
> wakeup was required but not provided, the interface must go through
> a get/put cycle or the core will never reattempt to suspend the device.
> This brakes runtime PM for all joysticks.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.de>

This seems reasonable, although it would be nice if there was a way to 
do this without waking up the device if it was already in runtime 
suspend.  Perhaps make the get/put conditional on 
pm_runtime_active(&usbhid->intf->dev)?  It's okay to do the get/put 
cycle after setting needs_remote_wakeup to 0.

By the way, how does the HID core handle the case where the device file 
is closed long after the device has disconnected?

Alan Stern


      reply	other threads:[~2015-04-15 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 13:18 [PATCH] usbhid: correct PM failure with closed devices Oliver Neukum
2015-04-15 14:56 ` Alan Stern [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=Pine.LNX.4.44L0.1504151042140.1404-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    /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.