diff options
author | David Brownell <david-b@pacbell.net> | 2005-09-27 10:38:54 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 16:47:41 -0700 |
commit | b13296c6617f22e8c0174a7af32780617db0e680 (patch) | |
tree | 980ed483e5df92335894405ac7eb37380598190d /drivers/usb/core/urb.c | |
parent | 5edbfb7c8af0577097dae87cdd4dfdba82bb9579 (diff) | |
download | linux-stable-b13296c6617f22e8c0174a7af32780617db0e680.tar.gz linux-stable-b13296c6617f22e8c0174a7af32780617db0e680.tar.bz2 linux-stable-b13296c6617f22e8c0174a7af32780617db0e680.zip |
[PATCH] updates for "controller suspended" handling
Reject URBs to _all_ devices when their host controllers are suspended;
even root hub registers will be unavailable. Also, don't reject urbs
to root hubs in other cases; the only upstream link is through that
controller (on PCI or whatever SOC bus is in use).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c | 28 ++++++++++++----------------
drivers/usb/core/urb.c | 3 ++-
2 files changed, 14 insertions(+), 17 deletions(-)
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r-- | drivers/usb/core/urb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index b32898e0a27d..f2a1fed2a802 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -237,7 +237,8 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) (dev->state < USB_STATE_DEFAULT) || (!dev->bus) || (dev->devnum <= 0)) return -ENODEV; - if (dev->state == USB_STATE_SUSPENDED) + if (dev->bus->controller->power.power_state.event != PM_EVENT_ON + || dev->state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; if (!(op = dev->bus->op) || !op->submit_urb) return -ENODEV; |