Commit 530e16e83867dcf4df0fcc5e193214a40c565181

ckolivas 2014-02-27T17:23:48

Disable a device that fails to prepare.

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 df6f30f..1f3e0f8 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -8351,8 +8351,10 @@ static void hotplug_process(void)
 			thr->cgpu = cgpu;
 			thr->device_thread = j;
 
-			if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr))
+			if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr)) {
+				cgpu->deven = DEV_DISABLED;
 				continue;
+			}
 
 			if (unlikely(thr_info_create(thr, NULL, miner_thread, thr)))
 				quit(1, "hotplug thread %d create failed", thr->id);