Skip to content

snagfactory: add configurable USB re-enumeration timeout - #4

Merged
BakyarajM merged 1 commit into
auto-sparse-conversionfrom
USB-timeout
Sep 2, 2026
Merged

BakyarajM merged 1 commit into
auto-sparse-conversionfrom
USB-timeout

Conversation

@BakyarajM

Copy link
Copy Markdown

After snagrecover downloads U-Boot, snagflash immediately attempts to reconnect over Fastboot. The existing get_usb() retry loop only waits ~9 seconds before giving up, which may be not enough time for previous stage bootloader to exit, handover control to U-Boot, U-Boot to boot and re-enumerate the Fastboot USB gadget.

Add an optional "usb-wait-timeout" global parameter to the Snagfactory configuration file, specifying the number of seconds to wait for the board's Fastboot USB device to reappear. This value is forwarded to snagflash's fastboot() entry point and converted into a corresponding number of get_usb() retries, overriding the default when set.

After snagrecover downloads U-Boot, snagflash immediately attempts to
reconnect over Fastboot. The existing get_usb() retry loop only waits
~9 seconds before giving up, which may be not enough time for previous
stage bootloader to exit, handover control to U-Boot, U-Boot to boot
and re-enumerate the Fastboot USB gadget.

Add an optional "usb-wait-timeout" global parameter to the Snagfactory
configuration file, specifying the number of seconds to wait for the
board's Fastboot USB device to reappear. This value is forwarded to
snagflash's fastboot() entry point and converted into a corresponding
number of get_usb() retries, overriding the default when set.

Signed-off-by: Bakyaraj Moorthy <bmoorthy@qti.qualcomm.com>
@BakyarajM
BakyarajM merged commit b592398 into auto-sparse-conversion Sep 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants