Commit 4bfa4c3091b8b58226d324048b9573ea06f17c9d

Kano 2013-04-27T14:39:31

bflsc queue_full shouldn't ask for more work if device is zombie

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/driver-bflsc.c b/driver-bflsc.c
index 17cff72..14ca9fb 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -1544,9 +1544,11 @@ static bool bflsc_queue_full(struct cgpu_info *bflsc)
 	// if something is wrong with a device try the next one available
 	// TODO: try them all? Add an unavailable flag to sc_devs[i] init to 0 here first
 	while (++tries < 3) {
-		// Device is gone
-		if (bflsc->usbinfo.nodev)
-			return false;
+		// Device is gone - shouldn't normally get here
+		if (bflsc->usbinfo.nodev) {
+			ret = true;
+			break;
+		}
 
 		dev = -1;
 		rd_lock(&(sc_info->stat_lock));