Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5972c7ac authored by Ido Shayevitz's avatar Ido Shayevitz
Browse files

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: default avatarLena Salman <esalman@codeaurora.org>
Signed-off-by: default avatarIdo Shayevitz <idos@codeaurora.org>
parent 179fd82c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,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
+7 −2
Original line number Diff line number Diff line
@@ -1793,8 +1793,13 @@ static int dwc_gadget_func_wakeup(struct usb_gadget *g, int interface_id)
		return -EAGAIN;
	}

	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");