]> git.baikalelectronics.ru Git - kernel.git/commit
USB: Update last_busy time after autosuspend fails
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 3 Nov 2011 23:52:46 +0000 (00:52 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 4 Nov 2011 21:28:14 +0000 (22:28 +0100)
commit2071278fa66445e58b67dbc1c40fcb705cf69e50
treede1248abbc2a45e9798fceb2e9df57bf7440c6d9
parente8bbc094d170f8bb303c17491a74436325448cd2
USB: Update last_busy time after autosuspend fails

Originally, the runtime PM core would send an idle notification
whenever a suspend attempt failed.  The idle callback routine could
then schedule a delayed suspend for some time later.

However this behavior was changed by commit
05189183fa319d1461bd0acc4c725288014d5509 (PM / Runtime: Remove idle
notification after failing suspend).  No notifications were sent, and
there was no clear mechanism to retry failed suspends.

This caused problems for the usbhid driver, because it fails
autosuspend attempts as long as a key is being held down.  A companion
patch changes the PM core's behavior, but we also need to change the
USB core.  In particular, this patch (as1493) updates the device's
last_busy time when an autosuspend fails, so that the PM core will
retry the autosuspend in the future when the delay time expires
again.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Henrik Rydberg <rydberg@euromail.se>
Cc: <stable@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/usb/core/driver.c