1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

icarus report err on read failure

This commit is contained in:
Kano 2013-05-20 13:41:46 +10:00
parent 350e7f893f
commit 685d0ef14d

View File

@ -353,7 +353,8 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct
err = usb_read_timeout(icarus, (char *)buf, read_amount, &amt, ICARUS_WAIT_TIMEOUT, C_GETRESULTS); err = usb_read_timeout(icarus, (char *)buf, read_amount, &amt, ICARUS_WAIT_TIMEOUT, C_GETRESULTS);
cgtime(&read_finish); cgtime(&read_finish);
if (err < 0 && err != LIBUSB_ERROR_TIMEOUT) { if (err < 0 && err != LIBUSB_ERROR_TIMEOUT) {
applog(LOG_ERR, "%s%i: Comms error", icarus->drv->name, icarus->device_id); applog(LOG_ERR, "%s%i: Comms error (err=%d amt=%d)",
icarus->drv->name, icarus->device_id, err, amt);
dev_error(icarus, REASON_DEV_COMMS_ERROR); dev_error(icarus, REASON_DEV_COMMS_ERROR);
return ICA_NONCE_ERROR; return ICA_NONCE_ERROR;
} }