Commit 1ffd64ba8f326ed9307ff66754e92ab7c2c79ca7

Con Kolivas 2013-12-09T14:12:56

Attempt a libusb reset device on usb devices that have stopped responding.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/cgminer.c b/cgminer.c
index aa11fe6..089f585 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6797,6 +6797,11 @@ static void *longpoll_thread(void __maybe_unused *userdata)
 
 void reinit_device(struct cgpu_info *cgpu)
 {
+#ifdef USE_USBUTILS
+	/* Attempt a usb device reset if the device has gone sick */
+	if (cgpu->usbdev && cgpu->usbdev->handle)
+		libusb_reset_device(cgpu->usbdev->handle);
+#endif
 	cgpu->drv->reinit_device(cgpu);
 }