Commit a10371b98e128b6c9b858c25c652a0a7b3122bc4

Con Kolivas 2013-05-29T23:03:32

Shut down the avalon mining thread if the device disappears.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-avalon.c b/driver-avalon.c
index a07a437..3ac15ff 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -1060,6 +1060,12 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 		info->reset = true;
 	}
 
+	if (unlikely(avalon->usbinfo.nodev)) {
+		applog(LOG_ERR, "AVA%d: Device disappeared, shutting down thread",
+		       avalon->device_id);
+		avalon->shutdown = true;
+	}
+
 	/* This hashmeter is just a utility counter based on returned shares */
 	return hash_count;
 }