Commit 7d64e807ec1dc7beeb486fa9a06c7f51816b0d1b

Con Kolivas 2014-02-07T08:55:31

Do not register as successful a hfa init sequence that reports the clockrate as zero.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8d2e20c..90667c2 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -423,6 +423,12 @@ tryagain:
 	       db->sequence_modulus);
 	info->num_sequence = db->sequence_modulus;
 
+	if (!db->hash_clockrate) {
+		applog(LOG_INFO, "%s %d: OP_USB_INIT failed! Clockrate reported as zero",
+		       hashfast->drv->name, hashfast->device_id);
+		return false;
+	}
+
 	// Now a copy of the config data used
 	if (!hfa_get_data(hashfast, (char *)&info->config_data, U32SIZE(info->config_data))) {
 		applog(LOG_WARNING, "%s %d: OP_USB_INIT failed! Failure to get config_data",