mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "usb: dwc3: Clear err_evt_seen flag on disconnect"
This commit is contained in:
commit
3e6e29afed
2 changed files with 8 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
|
@ -4992,6 +4992,11 @@ static int dwc3_otg_start_peripheral(struct dwc3_msm *mdwc, int on)
|
|||
|
||||
mdwc->in_device_mode = false;
|
||||
usb_gadget_vbus_disconnect(&dwc->gadget);
|
||||
/*
|
||||
* Clearing err_evt_seen after disconnect ensures that interrupts
|
||||
* are ignored if err_evt_seen is set
|
||||
*/
|
||||
dwc->err_evt_seen = false;
|
||||
usb_phy_notify_disconnect(mdwc->hs_phy, USB_SPEED_HIGH);
|
||||
usb_phy_notify_disconnect(mdwc->ss_phy, USB_SPEED_SUPER);
|
||||
redriver_notify_disconnect(mdwc->ss_redriver_node);
|
||||
|
|
|
|||
|
|
@ -2330,7 +2330,8 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
|
|||
dwc->softconnect = is_on;
|
||||
|
||||
if (((dwc->dr_mode > USB_DR_MODE_HOST) && !dwc->vbus_active)
|
||||
|| !dwc->gadget_driver || dwc->err_evt_seen) {
|
||||
|| !dwc->gadget_driver || (dwc->err_evt_seen &&
|
||||
dwc->softconnect)) {
|
||||
/*
|
||||
* Need to wait for vbus_session(on) from otg driver or to
|
||||
* the udc_start.
|
||||
|
|
|
|||
Loading…
Reference in a new issue