From: Oliver Neukum Date: Mon, 15 Sep 2008 15:29:28 +0000 (+0200) Subject: USB: RESET_RESUME needs to block autosuspend when remote wakeup is needed X-Git-Tag: v2.6.28-rc1~254^2~69 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=399d31da4e2f701ba91cdb4b39e074d6e16174a9;p=~emulex%2Finfiniband.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 5a7fa6f0995..e935be7eb46 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -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; } }