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

Skip to content
Commit d09d4910 authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarJack Pham <jackp@codeaurora.org>
parent 2e7c3098
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment