usb: dwc3: Fix default mode initialization
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 25 Oct 2023 09:51:10 +0000 (11:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:33:10 +0000 (07:33 +0100)
commit7985c3d7e879980127fb05620fb04fd4c9830ee2
treea71b4aa17810ca755f0727a9c0828778736bfbc5
parent92e44bdbec7d6e276b3a2fa8917a9b10dba9845d
usb: dwc3: Fix default mode initialization

commit 10d510abd096d620b9fda2dd3e0047c5efc4ad2b upstream.

The default mode, configurable by DT, shall be set before usb role switch
driver is registered. Otherwise there is a race between default mode
and mode set by usb role switch driver.

Fixes: 98ed256a4dbad ("usb: dwc3: Add support for role-switch-default-mode binding")
Cc: stable <stable@kernel.org>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20231025095110.2405281-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/drd.c