mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
usb: dwc3: Don't touch gadget->max_speed while limiting the speed
The gadget->max_speed should not be changed dynamically as it can mess up the descriptor preparation. Let it be the max supported by the hardware and changed the dwc3->maximum_speed to force the controller to enumerate at lower speed when needed. This makes sure that the descriptors for all speeds are cached during bind of the function drivers. Change-Id: Id7fd8f23bb84f7396a6e3b62c5e61c4536522d82 Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This commit is contained in:
parent
37a3bfb6ec
commit
013be6c7ff
2 changed files with 2 additions and 4 deletions
|
|
@ -3752,10 +3752,8 @@ skip_update:
|
|||
dwc->maximum_speed, dwc->max_hw_supp_speed,
|
||||
mdwc->override_usb_speed);
|
||||
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, "speed", dwc->maximum_speed);
|
||||
|
||||
|
|
|
|||
|
|
@ -4431,7 +4431,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
|
|||
dev_info(dwc->dev, "changing max_speed on rev %08x\n",
|
||||
dwc->revision);
|
||||
|
||||
dwc->gadget.max_speed = dwc->maximum_speed;
|
||||
dwc->gadget.max_speed = dwc->max_hw_supp_speed;
|
||||
|
||||
/*
|
||||
* REVISIT: Here we should clear all pending IRQs to be
|
||||
|
|
|
|||
Loading…
Reference in a new issue