Skip to content

Commit 399d31d

Browse files
Oliver Neukumgregkh
authored andcommitted
USB: RESET_RESUME needs to block autosuspend when remote wakeup is needed
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6826504 commit 399d31d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/usb/core/driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,8 @@ static int autosuspend_check(struct usb_device *udev, int reschedule)
10701070
struct usb_driver *driver;
10711071

10721072
driver = to_usb_driver(intf->dev.driver);
1073-
if (!driver->reset_resume)
1073+
if (!driver->reset_resume ||
1074+
intf->needs_remote_wakeup)
10741075
return -EOPNOTSUPP;
10751076
}
10761077
}

0 commit comments

Comments
 (0)