Skip to content
Commit 111a76d0 authored by Jack Pham's avatar Jack Pham Committed by Kader Bava
Browse files

RMX1921: recovery: Wait for USB UDC to be created



After setting the DWC3 controller into peripheral mode, there is
still a race in which the on property:sys.usb.config=adb or fastboot
action may proceed to write the UDC to the ConfigFS gadget but the
UDC is still in the middle of being created. This results in failure
to bind the gadget.

Although adbd contains a built-in retry mechanism that results in
sys.usb.ffs.ready getting set to 1 again which causes the action to
be retried, fastbootd does not implement such a retry, so there is
only one shot to successfully bind the UDC to ConfigFS. To help
the chance of success, add another wait for up to a second for the
/sys/class/udc/<controller> path to be created to ensure it is
present before the sys.usb.config=fastboot action executes.

Change-Id: Iec9d56c39ca6f10ca4298b9050ba744cd0c08ef9
Signed-off-by: default avatarkaderbava <ksbava7325@gmail.com>
parent 51098324
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment