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: kaderbava <ksbava7325@gmail.com>
Loading
Please register or sign in to comment