1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

More BFL tweaks.

Add delay between closing and reopening port.
Remove buffer clear in re-init
Add kernel type (mini-rig or single)
This commit is contained in:
Paul Sheppard 2012-07-06 11:57:53 -07:00
parent 957d196180
commit 19b4d2b9de

View File

@ -88,8 +88,11 @@ static bool bitforce_detect_one(const char *devpath)
if (opt_bfl_noncerange) {
bitforce->nonce_range = true;
bitforce->sleep_ms = BITFORCE_SLEEP_MS;
} else
bitforce->kname = "Mini-rig";
} else {
bitforce->sleep_ms = BITFORCE_SLEEP_MS * 5;
bitforce->kname = "Single";
}
if (likely((!memcmp(pdevbuf, ">>>ID: ", 7)) && (s = strstr(pdevbuf + 3, ">>>")))) {
s[0] = '\0';
@ -172,11 +175,11 @@ void bitforce_init(struct cgpu_info *bitforce)
applog(LOG_WARNING, "BFL%i: Re-initalizing", bitforce->device_id);
biforce_clear_buffer(bitforce);
mutex_lock(&bitforce->device_mutex);
if (fdDev)
if (fdDev) {
BFclose(fdDev);
sleep(5);
}
bitforce->device_fd = 0;
fdDev = BFopen(devpath);
@ -282,6 +285,7 @@ re_send:
applog(LOG_WARNING, "BFL%i: Does not support nonce range, disabling", bitforce->device_id);
bitforce->nonce_range = false;
bitforce->sleep_ms *= 5;
bitforce->kname = "Single";
goto re_send;
}
applog(LOG_ERR, "BFL%i: Error: Send work reports: %s", bitforce->device_id, pdevbuf);