Browse Source

Drillbit: Be strict about not accepting any boards with newer protocol versions. Protocol version bumps are non-backwards-compatible.

Angus Gratton 12 years ago
parent
commit
270c1d01f3
1 changed files with 5 additions and 6 deletions
  1. 5 6
      driver-drillbit.c

+ 5 - 6
driver-drillbit.c

@@ -95,7 +95,7 @@ err:
 			strcpy(product, "Eight");
 	}
 	else
-	if (chips == 8 && !strcmp(product, "Eight"))
+	if ((chips % 8 == 0) && !strcmp(product, "Eight"))
 	{}  // Known device
 	else
 	if (chips == 1 && !strcmp(product, "Thumb"))
@@ -103,12 +103,11 @@ err:
 	else
 		loglev = LOG_DEBUG;
 	
-	if (protover < DRILLBIT_MIN_VERSION || (loglev == LOG_DEBUG && protover > DRILLBIT_MAX_VERSION))
-		applogr(false, loglev, "%s: %s: Unknown device protocol version %u.",
-		        __func__, devpath, protover);
-	if (protover > DRILLBIT_MAX_VERSION)
-		applogr(false, loglev, "%s: %s: Device firmware uses newer Drillbit protocol %u. We only support up to %u. Find a newer BFGMiner!",
+	if (protover < DRILLBIT_MIN_VERSION || (loglev == LOG_DEBUG && protover > DRILLBIT_MAX_VERSION)) {
+		applogr(false, LOG_ERR, "%s: %s: Device firmware uses newer Drillbit protocol %u. We only support up to %u. Find a newer BFGMiner!",
 		        __func__, devpath, protover, (unsigned)DRILLBIT_MAX_VERSION);
+		return false;
+	}
 	
 	if (protover == 2 && chips == 1)
 		// Production firmware Thumbs don't set any capability bits, so fill in the EXT_CLOCK one