diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-08-12 14:33:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-21 10:26:36 -0700 |
commit | 55151d7daba185f94e9dc561a5a2ba36b5f647dd (patch) | |
tree | a769ff8a82367c8767d03c733278a078536e0945 /include | |
parent | 65605ae8e587d714f73e674369bc4cd5a1e53a9b (diff) | |
download | op-kernel-dev-55151d7daba185f94e9dc561a5a2ba36b5f647dd.zip op-kernel-dev-55151d7daba185f94e9dc561a5a2ba36b5f647dd.tar.gz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 0924cd9..94ac74a 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -110,6 +110,8 @@ enum usb_interface_condition { * @sysfs_files_created: sysfs attributes exist * @needs_remote_wakeup: flag set when the driver requires remote-wakeup * capability during autosuspend. + * @needs_altsetting0: flag set when a set-interface request for altsetting 0 + * has been deferred. * @needs_binding: flag set when the driver should be re-probed or unbound * following a reset or suspend operation it doesn't support. * @dev: driver model's view of this device @@ -162,6 +164,7 @@ struct usb_interface { unsigned is_active:1; /* the interface is not suspended */ unsigned sysfs_files_created:1; /* the sysfs attributes exist */ unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ + unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ unsigned needs_binding:1; /* needs delayed unbind/rebind */ struct device dev; /* interface specific device info */ |