From c7eaee00aa04377b23893993930cbf0042df7d65 Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Wed, 20 Jan 2021 14:44:53 -0800 Subject: [PATCH] dwc3: gadget: Resume USB bus unconditionally for USB super speed and above dwc3_gadget_wakeup() API is called for remote wakeup in high speed as well function remote wakeup context in super speed if USB is into low power mode. For USB func remote wakeup context, bring USB out of lower power mode and resume USB bus unconditionally. Change-Id: I98d015bb0040bcd31b90a464ca25b3e600587a9c Signed-off-by: Mayank Rana --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index f6643a6e4844..e62660b72795 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2105,7 +2105,7 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g) unsigned long flags; spin_lock_irqsave(&dwc->lock, flags); - if (!dwc->is_remote_wakeup_enabled) { + if (g->speed < USB_SPEED_SUPER && !dwc->is_remote_wakeup_enabled) { spin_unlock_irqrestore(&dwc->lock, flags); dbg_log_string("remote wakeup not supported\n"); return -EINVAL;