1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-27 15:04:17 +00:00

Treat timeout errors on usb writes as IO errors.

This commit is contained in:
Con Kolivas 2013-11-03 19:49:00 +11:00
parent dfba30b9f2
commit 0cceaccf75

View File

@ -466,6 +466,15 @@ static const char *nodatareturned = "no data returned ";
cgpu->usbinfo.continuous_ioerr_count = 0; \
}
/* Timeout errors on writes are unusual and should be treated as IO errors. */
#define WRITEIOERR_CHECK(cgpu, err) \
if (err == LIBUSB_ERROR_IO || err == LIBUSB_ERROR_TIMEOUT) { \
cgpu->usbinfo.ioerr_count++; \
cgpu->usbinfo.continuous_ioerr_count++; \
} else { \
cgpu->usbinfo.continuous_ioerr_count = 0; \
}
#if 0 // enable USBDEBUG - only during development testing
static const char *debug_true_str = "true";
static const char *debug_false_str = "false";