diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-09-10 19:34:26 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-13 01:55:26 +0400 |
commit | 6840d2555afd66290be7a39b400b5e66a840b82d (patch) | |
tree | cfc969126e5915db6536382cddbfdd9a63f5b3c8 /drivers/usb/core/urb.c | |
parent | 95cf82f99cfbd697c15572c444bd4f54f19745b0 (diff) | |
download | linux-6840d2555afd66290be7a39b400b5e66a840b82d.tar.xz |
USB: flush outstanding URBs when suspending
This patch (as989) makes usbcore flush all outstanding URBs for each
device as the device is suspended. This will be true even when
CONFIG_USB_SUSPEND is not enabled.
In addition, an extra can_submit flag is added to the usb_device
structure. That flag will be turned off whenever a suspend request
has been received for the device, even if the device isn't actually
suspended because CONFIG_USB_SUSPEND isn't set.
It's no longer necessary to check for the device state being equal to
USB_STATE_SUSPENDED during URB submission; that check can be replaced
by a check of the can_submit flag. This also permits us to remove
some questionable references to the deprecated power.power_state field.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r-- | drivers/usb/core/urb.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 76db76fdb4ec..c20c03aaf012 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -286,9 +286,6 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) return -EINVAL; if (!(dev = urb->dev) || dev->state < USB_STATE_DEFAULT) return -ENODEV; - if (dev->bus->controller->power.power_state.event != PM_EVENT_ON - || dev->state == USB_STATE_SUSPENDED) - return -EHOSTUNREACH; /* For now, get the endpoint from the pipe. Eventually drivers * will be required to set urb->ep directly and we will eliminate |