Skip to content

Commit 43f5ff9

Browse files
Pratham PratapGerrit - the friendly Code Review server
authored andcommitted
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: Pratham Pratap <[email protected]>
1 parent b225efc commit 43f5ff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/dwc3/dwc3-msm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,7 @@ static void dwc3_resume_work(struct work_struct *w)
28542854
dwc->maximum_speed = USB_SPEED_HIGH;
28552855

28562856
if (mdwc->override_usb_speed &&
2857-
mdwc->override_usb_speed < dwc->maximum_speed) {
2857+
mdwc->override_usb_speed <= dwc->maximum_speed) {
28582858
dwc->maximum_speed = mdwc->override_usb_speed;
28592859
dwc->gadget.max_speed = dwc->maximum_speed;
28602860
dbg_event(0xFF, "override_speed",

0 commit comments

Comments
 (0)