From 6c16439a24013225ad0ce2e433954021c353bdc0 Mon Sep 17 00:00:00 2001 From: Sriharsha Allenki Date: Thu, 17 May 2018 11:25:06 +0530 Subject: [PATCH] usb: core: Resume the devices on pm restore On system restoring from hibernation to reset-resume the connected USB devices, resume the devices on pm restore irrespective of the skip_resume flag. Change-Id: I56e46c579db572e39eabdc6d2be95b00f2c7d9cb Signed-off-by: Sriharsha Allenki Signed-off-by: Ajay Agarwal --- drivers/usb/core/driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index ee33c0d796b5..55322469084d 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1495,9 +1495,10 @@ int usb_resume(struct device *dev, pm_message_t msg) * Some buses would like to keep their devices in suspend * state after system resume. Their resume happen when * a remote wakeup is detected or interface driver start - * I/O. + * I/O. And in the case when the system is restoring from + * hibernation, make sure all the devices are resumed. */ - if (udev->bus->skip_resume) + if (udev->bus->skip_resume && msg.event != PM_EVENT_RESTORE) return 0; /* For all calls, take the device back to full power and