Browse Source

bitforce: Reinstate device work inprogress count sanity check for 28nm devices

BFL_Jonathon 11 years ago
parent
commit
4f77bf85f9
2 changed files with 7 additions and 5 deletions
  1. 1 0
      AUTHORS
  2. 6 5
      driver-bitforce.c

+ 1 - 0
AUTHORS

@@ -26,6 +26,7 @@ anajavi
 Andrew McDonald <andrew@mcdonald.org.uk>
 Ang Iongchun <angiongchun@gmail.com>
 ArtForz
+BFL_Jonathon <jonathon@butterflylabs.com>
 Bitfury
 blinkier <blinkiest@gmail.com>
 bluemurder <bluemurder@engineer.com>

+ 6 - 5
driver-bitforce.c

@@ -2614,13 +2614,14 @@ void bitforce_queue_flush(struct thr_info *thr)
 		bitforce_queue_flush_sanity_check(thr, &processing, keysz, true);
 	
 final: ;
-#if 0
-	if (unlikely(inproc != -1 && inproc != data->queued))
+	if (data->style == BFS_28NM)
 	{
-		applog(LOG_WARNING, "%"PRIpreprv": Sanity check: Device work inprogress count mismatch (dev inproc=%d, queued=%d)", bitforce->proc_repr, inproc, data->queued);
-		data->queued = inproc;
+		if (unlikely(inproc != -1 && inproc != data->queued))
+		{
+			applog(LOG_WARNING, "%"PRIpreprv": Sanity check: Device work inprogress count mismatch (dev inproc=%d, queued=%d)", bitforce->proc_repr, inproc, data->queued);
+			data->queued = inproc;
+		}
 	}
-#endif
 }
 
 static