usb: dwc3-msm: Fix maximum_speed determination
Currently in case EXTCON_PROP_USB_SS reports high-speed only
(e.g. Type-C/DisplayPort 4-lane mode), dwc->maximum_speed is
overridden to USB_SPEED_HIGH and restarts the controller.
However, on subsequent connections, even if EXTCON_PROP_USB_SS
reports true, the maximum_speed is not getting restored back
to the highest supported speed and is permanently limited.
Fix this by always evaluating the highest possible speed, and
consider lowering the speed either when EXTCON_USB_SS is 0 or
when override_usb_speed (set via sysfs) is a lower speed.
Retain the override_usb_speed so that it can apply for
subsequent connections as well, and remove it when the user
sets it equal or higher to the maximum supported speed.
Change-Id: I2b66ed01ba3b0cc7958b9fe71269c36a4d2d1234
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment