]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:43 +0000 (10:07 +0100)
commitf9a314f5aa59266cee10242a9503991b29979557
treedf072680b5aa1c3a0b1b235ca12dc27885d9ff21
parent0cf8eb3b9858a4e0714378dec4b2ba7dc1b47bf2
usb: dwc3: core: Properly default unspecified speed

[ Upstream commit b574ce3ee45937f4a01edc98c59213bfc7effe50 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/core.c