Skip to content

Commit

Permalink
USB: RESET_RESUME needs to block autosuspend when remote wakeup is ne…
Browse files Browse the repository at this point in the history
…eded

Reset upon resumption will wipe the input buffer and is therefore
a reason to not suspend if remote wakeup is requested because
the driver needs that data.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 6826504 commit 399d31d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ static int autosuspend_check(struct usb_device *udev, int reschedule)
struct usb_driver *driver;

driver = to_usb_driver(intf->dev.driver);
if (!driver->reset_resume)
if (!driver->reset_resume ||
intf->needs_remote_wakeup)
return -EOPNOTSUPP;
}
}
Expand Down

0 comments on commit 399d31d

Please sign in to comment.