]> git.baikalelectronics.ru Git - kernel.git/commit
USB: Defer Set-Interface for suspended devices
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 12 Aug 2008 18:33:59 +0000 (14:33 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Aug 2008 17:26:36 +0000 (10:26 -0700)
commita47aed49fea1289973f0e464ee286281a35de91b
treea769ff8a82367c8767d03c733278a078536e0945
parentd67e8088405ea5751ae3fcff777e1d171756e8d0
USB: Defer Set-Interface for suspended devices

This patch (as1128) fixes one of the problems related to the new PM
infrastructure.  We are not allowed to register new child devices
during the middle of a system sleep transition, but unbinding a USB
driver causes the core to automatically install altsetting 0 and
thereby create new endpoint pseudo-devices.

The patch fixes this problem (and the related problem that installing
altsetting 0 will fail if the device is suspended) by deferring the
Set-Interface call until some later time when it is legal and can
succeed.  Possible later times are: when a new driver is being probed
for the interface, and when the interface is being resumed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
include/linux/usb.h