1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Attempt to initialise while bitforce device returns BUSY.

This commit is contained in:
Con Kolivas 2012-07-04 16:51:55 +10:00
parent ac8db06e46
commit 7046c976bc

View File

@ -176,14 +176,16 @@ void bitforce_init(struct cgpu_info *bitforce)
return; return;
} }
BFwrite(fdDev, "ZGX", 3); do {
BFgets(pdevbuf, sizeof(pdevbuf), fdDev); BFwrite(fdDev, "ZGX", 3);
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
if (unlikely(!pdevbuf[0])) {
mutex_unlock(&bitforce->device_mutex); if (unlikely(!pdevbuf[0])) {
applog(LOG_ERR, "BFL%i: Error reading (ZGX)", bitforce->device_id); mutex_unlock(&bitforce->device_mutex);
return; applog(LOG_ERR, "BFL%i: Error reading (ZGX)", bitforce->device_id);
} return;
}
} while (!strstr(pdevbuf, "BUSY"));
if (unlikely(!strstr(pdevbuf, "SHA256"))) { if (unlikely(!strstr(pdevbuf, "SHA256"))) {
mutex_unlock(&bitforce->device_mutex); mutex_unlock(&bitforce->device_mutex);