aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/driver.c6
-rw-r--r--drivers/usb/core/hcd.c10
2 files changed, 1 insertions, 15 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 3cd9af2638f..a3aed8d87dd 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1196,11 +1196,7 @@ static int usb_resume_both(struct usb_device *udev)
1196 /* We can't progagate beyond the USB subsystem, 1196 /* We can't progagate beyond the USB subsystem,
1197 * so if a root hub's controller is suspended 1197 * so if a root hub's controller is suspended
1198 * then we're stuck. */ 1198 * then we're stuck. */
1199 if (udev->dev.parent->power.power_state.event != 1199 status = usb_resume_device(udev);
1200 PM_EVENT_ON)
1201 status = -EHOSTUNREACH;
1202 else
1203 status = usb_resume_device(udev);
1204 } 1200 }
1205 } else { 1201 } else {
1206 1202
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 3df538539b4..5254c50086a 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -965,19 +965,9 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
965 else switch (hcd->state) { 965 else switch (hcd->state) {
966 case HC_STATE_RUNNING: 966 case HC_STATE_RUNNING:
967 case HC_STATE_RESUMING: 967 case HC_STATE_RESUMING:
968doit:
969 list_add_tail (&urb->urb_list, &ep->urb_list); 968 list_add_tail (&urb->urb_list, &ep->urb_list);
970 status = 0; 969 status = 0;
971 break; 970 break;
972 case HC_STATE_SUSPENDED:
973 /* HC upstream links (register access, wakeup signaling) can work
974 * even when the downstream links (and DMA etc) are quiesced; let
975 * usbcore talk to the root hub.
976 */
977 if (hcd->self.controller->power.power_state.event == PM_EVENT_ON
978 && urb->dev->parent == NULL)
979 goto doit;
980 /* FALL THROUGH */
981 default: 971 default:
982 status = -ESHUTDOWN; 972 status = -ESHUTDOWN;
983 break; 973 break;