Commit c29a36a4245432702c6242d625c5408cf634b1f7

Authored by Chris Burton
Committed by GitHub
1 parent 38f6addc

Change timeout in ep_read to 3 seconds (#50)

With recent kernels I get timeouts booting Linux with rpiboot, after increasing the timeout to 3000 I have no issues.

Debugging I see the ep_read call after ReadFile: cmdline.txt (before it tries to retrieve recovery.img/kernel.img) takes around 2.1-2.2 seconds which looks to be related to the size of the iniramfs I'm using.
Showing 1 changed file with 1 additions and 1 deletions
@@ -238,7 +238,7 @@ int ep_read(void *buf, int len, libusb_device_handle * usb_device) @@ -238,7 +238,7 @@ int ep_read(void *buf, int len, libusb_device_handle * usb_device)
238 libusb_control_transfer(usb_device, 238 libusb_control_transfer(usb_device,
239 LIBUSB_REQUEST_TYPE_VENDOR | 239 LIBUSB_REQUEST_TYPE_VENDOR |
240 LIBUSB_ENDPOINT_IN, 0, len & 0xffff, 240 LIBUSB_ENDPOINT_IN, 0, len & 0xffff,
241 - len >> 16, buf, len, 2000); 241 + len >> 16, buf, len, 3000);
242 if(ret >= 0) 242 if(ret >= 0)
243 return len; 243 return len;
244 else 244 else