]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
usb: dwc3: core: Properly default unspecified speed
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Fri, 24 Jul 2020 21:01:02 +0000 (14:01 -0700)
committerFelipe Balbi <balbi@kernel.org>
Thu, 24 Sep 2020 08:56:16 +0000 (11:56 +0300)
commitb574ce3ee45937f4a01edc98c59213bfc7effe50
treeaa718d6e876b92d4d6c1df92ba61a4f330392024
parent362b9398c962c9ec563653444e15ef9032ef3a90
usb: dwc3: core: Properly default unspecified speed

If the maximum_speed is not specified, default the device speed base on
its HW capability. Don't prematurely check HW capability before
validating the maximum_speed device property. The device property takes
precedence in dwc->maximum_speed.

Fixes: 0e1e5c47f7a9 ("usb: dwc3: add support for USB 2.0-only core configuration")
Reported-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/core.c