|
|
|
@ -339,12 +339,15 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
@@ -339,12 +339,15 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
|
|
|
|
|
while (bitforce->wait_ms < BITFORCE_LONG_TIMEOUT_MS) { |
|
|
|
|
if (unlikely(work_restart[thr->id].restart)) |
|
|
|
|
return 1; |
|
|
|
|
|
|
|
|
|
mutex_lock(&bitforce->device_mutex); |
|
|
|
|
BFwrite(fdDev, "ZFX", 3); |
|
|
|
|
BFgets(pdevbuf, sizeof(pdevbuf), fdDev); |
|
|
|
|
mutex_unlock(&bitforce->device_mutex); |
|
|
|
|
|
|
|
|
|
if (pdevbuf[0] && pdevbuf[0] != 'B') /* BFL does not respond during throttling */ |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
/* if BFL is throttling, no point checking so quickly */ |
|
|
|
|
delay_time_ms = (pdevbuf[0] ? BITFORCE_CHECK_INTERVAL_MS : 2 * WORK_CHECK_INTERVAL_MS); |
|
|
|
|
usleep(delay_time_ms * 1000); |
|
|
|
@ -356,6 +359,7 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
@@ -356,6 +359,7 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
|
|
|
|
|
bitforce->device_last_not_well = time(NULL); |
|
|
|
|
bitforce->device_not_well_reason = REASON_DEV_OVER_HEAT; |
|
|
|
|
bitforce->dev_over_heat_count++; |
|
|
|
|
|
|
|
|
|
if (!pdevbuf[0]) /* Only return if we got nothing after timeout - there still may be results */ |
|
|
|
|
return 1; |
|
|
|
|
} else if (pdevbuf[0] == 'N') {/* Hashing complete (NONCE-FOUND or NO-NONCE) */ |
|
|
|
|