mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-12 14:12:15 +00:00
Check return code from hashfast_get_header in reset and fail when appropriate.
This commit is contained in:
parent
d7a907f26e
commit
775f2040e5
@ -210,8 +210,18 @@ static bool hashfast_reset(struct cgpu_info *hashfast, struct hashfast_info *inf
|
|||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!ret)
|
if (!ret) {
|
||||||
applog(LOG_WARNING, "HFA %d: OP_USB_INIT failed!", hashfast->device_id);
|
applog(LOG_WARNING, "HFA %d: OP_USB_INIT failed!", hashfast->device_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (h->crc8 != hcrc) {
|
||||||
|
applog(LOG_WARNING, "HFA %d: OP_USB_INIT failed! CRC mismatch", hashfast->device_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (h->operation_code != OP_USB_INIT) {
|
||||||
|
applog(LOG_WARNING, "HFA %d: OP_USB_INIT: Tossing packet, valid but unexpected type", hashfast->device_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user