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

Commit fe2d5646 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Fix enumeration failure when speed is overridden to super"

parents 6563b65a 87ddfb96
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2961,12 +2961,15 @@ static void dwc3_resume_work(struct work_struct *w)
	/* Check speed and Type-C polarity values in order to configure PHY */
	if (!eud_connected && edev && extcon_get_state(edev, extcon_id)) {
		dwc->maximum_speed = dwc->max_hw_supp_speed;
		dwc->gadget.max_speed = dwc->maximum_speed;

		ret = extcon_get_property(edev, extcon_id,
				EXTCON_PROP_USB_SS, &val);

		if (!ret && val.intval == 0)
		if (!ret && val.intval == 0) {
			dwc->maximum_speed = USB_SPEED_HIGH;
			dwc->gadget.max_speed = dwc->maximum_speed;
		}

		if (mdwc->override_usb_speed &&
			mdwc->override_usb_speed <= dwc->maximum_speed) {
@@ -2974,6 +2977,7 @@ static void dwc3_resume_work(struct work_struct *w)
			dwc->gadget.max_speed = dwc->maximum_speed;
			dbg_event(0xFF, "override_speed",
					mdwc->override_usb_speed);
			mdwc->override_usb_speed = 0;
		}

		dbg_event(0xFF, "speed", dwc->maximum_speed);