Skip to content

Commit

Permalink
2711: Fix handling of serial numbers in single shot mode
Browse files Browse the repository at this point in the history
It's possible that SerialNumber=3 might be received twice due to
differences in timing causing rpiboot to exit too early i.e. before
the second stage has started.

Tweak the loop condition to handle this.
  • Loading branch information
timg236 authored and pelwell committed Aug 19, 2020
1 parent c650cd7 commit 5030f16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ int main(int argc, char *argv[])
libusb_close(usb_device);
sleep(1);
}
while(loop || desc.iSerialNumber == 0);
while(loop || desc.iSerialNumber == 0 || desc.iSerialNumber == 3);

libusb_exit(ctx);

Expand Down

0 comments on commit 5030f16

Please sign in to comment.