Browse Source

Use the info timeout for read_nl in getidentify bflsc.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
0cd2c5c3c8
  1. 2
      driver-bflsc.c
  2. 2
      usbutils.h

2
driver-bflsc.c

@ -910,7 +910,7 @@ reinit: @@ -910,7 +910,7 @@ reinit:
goto unshin;
}
err = usb_read_nl(bflsc, buf, sizeof(buf)-1, &amount, C_GETIDENTIFY);
err = usb_read_nl_timeout(bflsc, buf, sizeof(buf)-1, &amount, BFLSC_INFO_TIMEOUT, C_GETIDENTIFY);
if (err < 0 || amount < 1) {
init_count++;
cgtime(&init_now);

2
usbutils.h

@ -315,7 +315,7 @@ void *usb_resource_thread(void *userdata); @@ -315,7 +315,7 @@ void *usb_resource_thread(void *userdata);
#define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \
_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)
#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeotu, cmd) \
#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "\n", cmd, false)
#define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \

Loading…
Cancel
Save