Browse Source

Merge branch 'master' into hashfast

Con Kolivas 12 years ago
parent
commit
634151ffa0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      usbutils.c

+ 2 - 2
usbutils.c

@@ -2274,7 +2274,7 @@ static int callback_wait(struct usb_transfer *ut, int *transferred, unsigned int
 	}
 	}
 	ret = transfer->status;
 	ret = transfer->status;
 	if (ret == LIBUSB_TRANSFER_CANCELLED)
 	if (ret == LIBUSB_TRANSFER_CANCELLED)
-		ret = LIBUSB_TRANSFER_TIMED_OUT;
+		ret = LIBUSB_ERROR_TIMEOUT;
 
 
 	/* No need to sort out mutexes here since they won't be reused */
 	/* No need to sort out mutexes here since they won't be reused */
 	*transferred = transfer->actual_length;
 	*transferred = transfer->actual_length;
@@ -2620,7 +2620,7 @@ int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t
 	memcpy((char *)buf, (const char *)usbbuf, (tot < (int)bufsiz) ? tot + 1 : (int)bufsiz);
 	memcpy((char *)buf, (const char *)usbbuf, (tot < (int)bufsiz) ? tot + 1 : (int)bufsiz);
 
 
 out_unlock:
 out_unlock:
-	if (err && err != LIBUSB_ERROR_TIMEOUT && err != LIBUSB_TRANSFER_TIMED_OUT) {
+	if (err && err != LIBUSB_ERROR_TIMEOUT) {
 		applog(LOG_WARNING, "%s %i usb read error: %s", cgpu->drv->name, cgpu->device_id,
 		applog(LOG_WARNING, "%s %i usb read error: %s", cgpu->drv->name, cgpu->device_id,
 		       libusb_error_name(err));
 		       libusb_error_name(err));
 		if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)
 		if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)