Commit 05c9ece81e358832ad24aa30b7b2e2ce219b0d35

Con Kolivas 2013-04-26T15:18:34

Differentiate BFLSC device from regular bitforce and give warning if no support is compiled in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/driver-bitforce.c b/driver-bitforce.c
index 0bbfb1d..cc4e412 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -248,6 +248,15 @@ reinit:
 		goto unshin;
 	}
 
+	if (strstr(buf, "SHA256 SC")) {
+#ifdef USE_BFLSC
+		applog(LOG_DEBUG, "SC device detected, will defer to BFLSC driver");
+#else
+		applog(LOG_WARNING, "SC device detected but no BFLSC support compiled in!");
+#endif
+		goto unshin;
+	}
+
 	if (likely((!memcmp(buf, ">>>ID: ", 7)) && (s = strstr(buf + 3, ">>>")))) {
 		s[0] = '\0';
 		bitforce->name = strdup(buf + 7);