Browse Source

Disable bitfury device thread on it disappearing.

Con Kolivas 12 years ago
parent
commit
87ddfcc8a6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      driver-bitfury.c

+ 6 - 0
driver-bitfury.c

@@ -283,6 +283,12 @@ cascade:
 		info->nonces--;
 		return (int64_t)0xffffffff;
 	}
+
+	if (unlikely(bitfury->usbinfo.nodev)) {
+		applog(LOG_WARNING, "%s %d: Device disappeared, disabling thread",
+		       bitfury->drv->name, bitfury->device_id);
+		return -1;
+	}
 	return 0;
 }