Commit f931392781de1f4f6fb8bc8a5678b3a95055ae60

Con Kolivas 2013-10-07T18:40:09

Check for libusb transfer stall error to be consistent with async IO errors returned for a halt condition.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index 451f063..da3435e 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2333,7 +2333,7 @@ usb_bulk_transfer(struct libusb_device_handle *dev_handle, int intinfo,
 				cgpu->drv->name, cgpu->device_id,
 				usb_cmdname(cmd), *transferred, err, errn);
 
-	if (err == LIBUSB_ERROR_PIPE) {
+	if (err == LIBUSB_ERROR_PIPE || err == LIBUSB_TRANSFER_STALL) {
 		cgpu->usbinfo.last_pipe = time(NULL);
 		cgpu->usbinfo.pipe_count++;
 		applog(LOG_INFO, "%s%i: libusb pipe error, trying to clear",