Commit 5030f1628835061a5f26534c11413d4bc75e322a

Authored by Tim Gover
Committed by Phil Elwell
1 parent c650cd74

2711: Fix handling of serial numbers in single shot mode

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.
Showing 1 changed file with 1 additions and 1 deletions
@@ -676,7 +676,7 @@ int main(int argc, char *argv[]) @@ -676,7 +676,7 @@ int main(int argc, char *argv[])
676 libusb_close(usb_device); 676 libusb_close(usb_device);
677 sleep(1); 677 sleep(1);
678 } 678 }
679 - while(loop || desc.iSerialNumber == 0); 679 + while(loop || desc.iSerialNumber == 0 || desc.iSerialNumber == 3);
680 680
681 libusb_exit(ctx); 681 libusb_exit(ctx);
682 682