Commit 79022974c7e15d096366f052b9280d4eebcce0be

Con Kolivas 2013-11-07T22:29:33

Make the avalon driver return -1 for hash count when usb fails, allowing the main loop code to send it the shutdown flag.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-avalon.c b/driver-avalon.c
index e83cfe3..2643c95 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -1503,7 +1503,7 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 	if (unlikely(avalon->usbinfo.nodev)) {
 		applog(LOG_ERR, "%s%d: Device disappeared, shutting down thread",
 		       avalon->drv->name, avalon->device_id);
-		avalon->shutdown = true;
+		hash_count = -1;
 	}
 
 	/* This hashmeter is just a utility counter based on returned shares */