mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 05:41:55 +00:00
Add usb command name to critical libusb error reporting.
This commit is contained in:
parent
ce61b9b060
commit
269a145a70
@ -2625,7 +2625,7 @@ int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t
|
|||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
if (err && err != LIBUSB_ERROR_TIMEOUT) {
|
if (err && err != LIBUSB_ERROR_TIMEOUT) {
|
||||||
applog(LOG_WARNING, "%s %i usb read err:(%d) %s", cgpu->drv->name, cgpu->device_id,
|
applog(LOG_WARNING, "%s %i %s usb read err:(%d) %s", cgpu->drv->name, cgpu->device_id, usb_cmdname(cmd),
|
||||||
err, libusb_error_name(err));
|
err, libusb_error_name(err));
|
||||||
if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)
|
if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)
|
||||||
err = LIBUSB_ERROR_OTHER;
|
err = LIBUSB_ERROR_OTHER;
|
||||||
@ -2725,7 +2725,7 @@ int _usb_write(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_
|
|||||||
*processed = tot;
|
*processed = tot;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
applog(LOG_WARNING, "%s %i usb write err:(%d) %s", cgpu->drv->name, cgpu->device_id,
|
applog(LOG_WARNING, "%s %i %s usb write err:(%d) %s", cgpu->drv->name, cgpu->device_id, usb_cmdname(cmd),
|
||||||
err, libusb_error_name(err));
|
err, libusb_error_name(err));
|
||||||
if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)
|
if (cgpu->usbinfo.continuous_ioerr_count > USB_RETRY_MAX)
|
||||||
err = LIBUSB_ERROR_OTHER;
|
err = LIBUSB_ERROR_OTHER;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user