mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-17 20:18:10 +00:00
fix(core/bootloader): fix retries when reading from USB
This commit is contained in:
parent
4d0381055c
commit
3f54b84aef
1
core/embed/bootloader/.changelog.d/2896.fixed
Normal file
1
core/embed/bootloader/.changelog.d/2896.fixed
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fixed retries counter when reading from USB
|
@ -198,6 +198,7 @@ static void _usb_webusb_read_retry(uint8_t iface_num, uint8_t *buf) {
|
|||||||
if (r != USB_PACKET_SIZE) { // reading failed
|
if (r != USB_PACKET_SIZE) { // reading failed
|
||||||
if (r == 0 && retry < 10) {
|
if (r == 0 && retry < 10) {
|
||||||
// only timeout => let's try again
|
// only timeout => let's try again
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// error
|
// error
|
||||||
error_shutdown("USB ERROR",
|
error_shutdown("USB ERROR",
|
||||||
|
Loading…
Reference in New Issue
Block a user