aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hub.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 90ae1753dda1..c2ac08755f27 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2362,6 +2362,10 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
2362 USB_DEVICE_REMOTE_WAKEUP, 0, 2362 USB_DEVICE_REMOTE_WAKEUP, 0,
2363 NULL, 0, 2363 NULL, 0,
2364 USB_CTRL_SET_TIMEOUT); 2364 USB_CTRL_SET_TIMEOUT);
2365
2366 /* System sleep transitions should never fail */
2367 if (!(msg.event & PM_EVENT_AUTO))
2368 status = 0;
2365 } else { 2369 } else {
2366 /* device has up to 10 msec to fully suspend */ 2370 /* device has up to 10 msec to fully suspend */
2367 dev_dbg(&udev->dev, "usb %ssuspend\n", 2371 dev_dbg(&udev->dev, "usb %ssuspend\n",
@@ -2611,16 +2615,15 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
2611 struct usb_device *hdev = hub->hdev; 2615 struct usb_device *hdev = hub->hdev;
2612 unsigned port1; 2616 unsigned port1;
2613 2617
2614 /* fail if children aren't already suspended */ 2618 /* Warn if children aren't already suspended */
2615 for (port1 = 1; port1 <= hdev->maxchild; port1++) { 2619 for (port1 = 1; port1 <= hdev->maxchild; port1++) {
2616 struct usb_device *udev; 2620 struct usb_device *udev;
2617 2621
2618 udev = hdev->children [port1-1]; 2622 udev = hdev->children [port1-1];
2619 if (udev && udev->can_submit) { 2623 if (udev && udev->can_submit) {
2620 if (!(msg.event & PM_EVENT_AUTO)) 2624 dev_warn(&intf->dev, "port %d nyet suspended\n", port1);
2621 dev_dbg(&intf->dev, "port %d nyet suspended\n", 2625 if (msg.event & PM_EVENT_AUTO)
2622 port1); 2626 return -EBUSY;
2623 return -EBUSY;
2624 } 2627 }
2625 } 2628 }
2626 2629