Skip to content

Commit

Permalink
usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Felipe Balbi committed Jun 20, 2016
1 parent b43bba9 commit 6b74289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
if ((speed == DWC3_DSTS_SUPERSPEED) ||
(speed == DWC3_DSTS_SUPERSPEED_PLUS)) {
dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed\n");
return -EINVAL;
return 0;
}

link_state = DWC3_DSTS_USBLNKST(reg);
Expand Down

0 comments on commit 6b74289

Please sign in to comment.