Commit 2614321a367d1be0e2c3d5be1d691b65d096f0e5

Con Kolivas 2014-02-08T07:51:06

Read pipe errors that don't clear are worth attempting to reset the usb.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index 0a79df1..3ba89c7 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2688,7 +2688,7 @@ int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t
 		if (err && err != LIBUSB_ERROR_TIMEOUT) {
 			applog(LOG_WARNING, "%s %i %s usb read err:(%d) %s", cgpu->drv->name,
 			       cgpu->device_id, usb_cmdname(cmd), err, libusb_error_name(err));
-			if (err != LIBUSB_ERROR_NO_DEVICE && err != LIBUSB_ERROR_PIPE) {
+			if (err != LIBUSB_ERROR_NO_DEVICE) {
 				err = libusb_reset_device(usbdev->handle);
 				applog(LOG_WARNING, "%s %i attempted reset got err:(%d) %s",
 				       cgpu->drv->name, cgpu->device_id, err, libusb_error_name(err));