Commit 8aeb27d9acc4322af7a51a396e1395f16c104986

ckolivas 2014-02-27T17:28:22

Don't try to reinit a device that's disabled.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 1f3e0f8..8967930 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7456,6 +7456,9 @@ static void *longpoll_thread(void __maybe_unused *userdata)
 
 void reinit_device(struct cgpu_info *cgpu)
 {
+	if (cgpu->deven == DEV_DISABLED)
+		return;
+
 #ifdef USE_USBUTILS
 	/* Attempt a usb device reset if the device has gone sick */
 	if (cgpu->usbdev && cgpu->usbdev->handle)