Commit 226107165153cd8770f292a70dfb6292606ac2e3

ckolivas 2014-06-27T09:20:15

Do initial detection of bflsc28 devices

diff --git a/driver-bflsc.c b/driver-bflsc.c
index 50c5475..2344c37 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -1,6 +1,6 @@
 /*
  * Copyright 2013 Andrew Smith
- * Copyright 2013 Con Kolivas
+ * Copyright 2013-2014 Con Kolivas
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -8,6 +8,8 @@
  * any later version.  See COPYING for more details.
  */
 
+#include "config.h"
+
 #include <float.h>
 #include <limits.h>
 #include <pthread.h>
@@ -18,8 +20,6 @@
 #include <sys/time.h>
 #include <unistd.h>
 
-#include "config.h"
-
 #ifdef WIN32
 #include <windows.h>
 #endif
@@ -629,7 +629,7 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
 			sc_dev.firmware = strdup(fields[0]);
 			sc_info->driver_version = drv_ver(bflsc, sc_dev.firmware);
 		}
-		else if (strstr(firstname, BFLSC_DI_ENGINES)) {
+		else if (strcasestr(firstname, BFLSC_DI_ENGINES)) {
 			sc_dev.engines = atoi(fields[0]);
 			if (sc_dev.engines < 1) {
 				tmp = str_text(items[i]);
diff --git a/driver-bflsc.h b/driver-bflsc.h
index f3b5ea1..eee2171 100644
--- a/driver-bflsc.h
+++ b/driver-bflsc.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Con Kolivas <kernel@kolivas.org>
+ * Copyright 2013-2014 Con Kolivas <kernel@kolivas.org>
  * Copyright 2013 Andrew Smith
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -307,6 +307,7 @@ struct SaveString {
 #define BFLSC_SINGLE "BAS"
 #define BFLSC_LITTLESINGLE "BAL"
 #define BFLSC_JALAPENO "BAJ"
+#define BFLSC_MONARCH "BMA"
 
 // Default expected time for a nonce range
 // - thus no need to check until this + last time work was found
diff --git a/usbutils.c b/usbutils.c
index 595ed05..2db1360 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -383,6 +383,18 @@ static struct usb_find_devices find_dev[] = {
 		.timeout = BFLSC_TIMEOUT_MS,
 		.latency = LATENCY_STD,
 		INTINFO(bas_ints) },
+	{
+		.drv = DRIVER_bflsc,
+		.name = "BMA",
+		.ident = IDENT_BMA,
+		.idVendor = IDVENDOR_FTDI,
+		.idProduct = 0x6014,
+		//.iManufacturer = "BUTTERFLY LABS"
+		.iProduct = "BitFORCE SC-28nm",
+		.config = 1,
+		.timeout = BFLSC_TIMEOUT_MS,
+		.latency = LATENCY_STD,
+		INTINFO(bas_ints) },
 #endif
 #ifdef USE_BITFORCE
 	{
diff --git a/usbutils.h b/usbutils.h
index 8e9f949..993977b 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -147,6 +147,7 @@ enum sub_ident {
 	IDENT_BF1,
 	IDENT_BFL,
 	IDENT_BLT,
+	IDENT_BMA,
 	IDENT_BTB,
 	IDENT_BXF,
 	IDENT_BXM,