mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
usb: dwc3: Set vbus_active in peripheral-only mode
The recent change in commit904ab34b54("usb: dwc3: ep0: Fail enqueue() when racing with vbus_sess disconnect") added a check to prevent queuing on ep0 if vbus_active is unset. However on some configurations if dwc3 is configured as peripheral-only, this flag is not set. In those cases, simply set vbus_active to true. Change-Id: Iaf8612b924ead1484dc585377e7eb0a46cc89a16 Fixes:904ab34b54("usb: dwc3: ep0: Fail enqueue() when racing with vbus_sess disconnect") Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
812f0991f0
commit
66eae47677
1 changed files with 2 additions and 0 deletions
|
|
@ -1209,6 +1209,8 @@ static int __maybe_unused dwc3_core_init_mode(struct dwc3 *dwc)
|
|||
dev_err(dev, "failed to initialize gadget\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
dwc->vbus_active = true;
|
||||
break;
|
||||
case USB_DR_MODE_HOST:
|
||||
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_HOST);
|
||||
|
|
|
|||
Loading…
Reference in a new issue