diff options
| author | Ido Shayevitz <idos@codeaurora.org> | 2014-08-14 10:20:49 +0300 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:06:50 -0700 |
| commit | 865addc7d416be1d8387a78df26ff4ca5b3a4d80 (patch) | |
| tree | 7ee174a1b5e27081ac75c97c3d328cbc34d4398f | |
| parent | d8a457b42d7ef205d0c0636449c2af2b292e8c7f (diff) | |
drivers: usb: dwc3: Add XMIT_DEV command
Starting with synopsis version 220A the command to wake up the
host changed from 0x3 to 0x7. The code is fixed accordingly.
The problem that was seen is that upon MBIM function
suspend, a remote wakeup from the IPA side wouldn't
wake up the host, and at some point a stall in the IPA would be
seen.
CRs-fixed: 695414
Change-Id: I6ef5c649f263f388a1cc92a3db71c14c741b5b71
Signed-off-by: Lena Salman <esalman@codeaurora.org>
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
| -rw-r--r-- | drivers/usb/dwc3/core.h | 1 | ||||
| -rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 8997c5c2b44e..f24c11988a5f 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -375,6 +375,7 @@ #define DWC3_DGCMD_SET_LMP 0x01 #define DWC3_DGCMD_SET_PERIODIC_PAR 0x02 #define DWC3_DGCMD_XMIT_FUNCTION 0x03 +#define DWC3_DGCMD_XMIT_DEV 0x07 /* These apply for core versions 1.94a and later */ #define DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO 0x04 diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index ca8cedf1261b..0a7751794c52 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1624,8 +1624,13 @@ static int dwc_gadget_func_wakeup(struct usb_gadget *g, int interface_id) return -EAGAIN; } - ret = dwc3_send_gadget_generic_command(dwc, - DWC3_DGCMD_XMIT_FUNCTION, interface_id); + if (dwc->revision < DWC3_REVISION_220A) { + ret = dwc3_send_gadget_generic_command(dwc, + DWC3_DGCMD_XMIT_FUNCTION, interface_id); + } else { + ret = dwc3_send_gadget_generic_command(dwc, + DWC3_DGCMD_XMIT_DEV, 0x1 | (interface_id << 4)); + } if (ret) pr_err("Function wakeup HW command failed.\n"); |
