Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299143
b: refs/heads/master
c: 879d38e
h: refs/heads/master
i:
  299141: 6bbf965
  299139: bf77007
  299135: 140c524
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent c717129 commit 02f2dfd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5d703dcc776cb542b41665f2b7e2ba054efb4a7
refs/heads/master: 879d38e6bc36d73b0ac40ec9b0d839fda9fa8b1a
12 changes: 12 additions & 0 deletions trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,18 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
if (status == 0) {
usb_set_device_state(rhdev, USB_STATE_SUSPENDED);
hcd->state = HC_STATE_SUSPENDED;

/* Did we race with a root-hub wakeup event? */
if (rhdev->do_remote_wakeup) {
char buffer[6];

status = hcd->driver->hub_status_data(hcd, buffer);
if (status != 0) {
dev_dbg(&rhdev->dev, "suspend raced with wakeup event\n");
hcd_bus_resume(rhdev, PMSG_AUTO_RESUME);
status = -EBUSY;
}
}
} else {
spin_lock_irq(&hcd_root_hub_lock);
if (!HCD_DEAD(hcd)) {
Expand Down

0 comments on commit 02f2dfd

Please sign in to comment.