From: Felipe Balbi Date: Fri, 13 May 2016 07:19:42 +0000 (+0300) Subject: UPSTREAM: usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed X-Git-Tag: firefly_0821_release~1833 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7d57ec8050baac82a48e5b8c073d5a97a6729bf4;p=firefly-linux-kernel-4.4.55.git UPSTREAM: usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed Instead of returning -EINVAL when someone calls __dwc3_gadget_wakeup() in speeds > highspeed, let's return 0. There are no problems for the driver for calling it in superspeed as we cleanly just return. This avoids an annoying WARN_ONCE() always triggering during superspeed enumeration with LPM enabled. Change-Id: Iff35ee46a782684db1c2339ad71a73a303cb3a89 Signed-off-by: Felipe Balbi Signed-off-by: Wu Liang feng (cherry picked from commit 6b74289937f624439c87135cfabb3deb2955fb53) --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index ad130fbd30f1..5be65bd6667a 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1441,7 +1441,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) speed = reg & DWC3_DSTS_CONNECTSPD; if (speed == DWC3_DSTS_SUPERSPEED) { dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed\n"); - return -EINVAL; + return 0; } link_state = DWC3_DSTS_USBLNKST(reg);