Commit 3bbb8976d3546781004269d55929ff943f2f1c3a

Con Kolivas 2014-02-20T11:35:02

Hfa device failure can be detected within 15 seconds so we should try restarting it sooner to avoid tripping the device's own watchdog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8bf5eb5..6baed0c 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1298,8 +1298,8 @@ static int64_t hfa_scanwork(struct thr_info *thr)
 		return -1;
 	}
 
-	if (unlikely(last_getwork - hashfast->last_device_valid_work > 60)) {
-		applog(LOG_WARNING, "%s %d: No valid hashes for over 1 minute, attempting to reset",
+	if (unlikely(last_getwork - hashfast->last_device_valid_work > 15)) {
+		applog(LOG_WARNING, "%s %d: No valid hashes for over 15 seconds, attempting to reset",
 		       hashfast->drv->name, hashfast->device_id);
 		if (info->hash_clock_rate > HFA_CLOCK_DEFAULT) {
 			info->hash_clock_rate -= 10;