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

Commit 3ecb4174 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: dwc3-msm: Fix maximum_speed determination



Currently driver is setting the user override speed to
maximum speed by checking if override speed is less than
the maximum speed. But this check will fail if the maximum
speed supported by the controller is super-speed and user
is trying to set it to super-speed from a lower speed. Fix
this by checking if override speed is equal to or less than
maximum speed.

Change-Id: Id71cf163548e213ec0180d7f3107395feed2f483
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 20a985e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2775,7 +2775,7 @@ static void dwc3_resume_work(struct work_struct *w)
			dwc->maximum_speed = USB_SPEED_HIGH;

		if (mdwc->override_usb_speed &&
				mdwc->override_usb_speed < dwc->maximum_speed) {
			mdwc->override_usb_speed <= dwc->maximum_speed) {
			dwc->maximum_speed = mdwc->override_usb_speed;
			dwc->gadget.max_speed = dwc->maximum_speed;
			dbg_event(0xFF, "override_speed",