mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-27 15:04:17 +00:00
icarus test nodev everywhere
This commit is contained in:
parent
250e435313
commit
5e588d87f4
@ -330,6 +330,9 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct
|
||||
|
||||
cgtime(tv_start);
|
||||
while (true) {
|
||||
if (icarus->usbinfo.nodev)
|
||||
return ICA_NONCE_ERROR;
|
||||
|
||||
cgtime(&read_start);
|
||||
err = usb_read_timeout(icarus, (char *)buf, read_amount, &amt, ICARUS_WAIT_TIMEOUT, C_GETRESULTS);
|
||||
cgtime(&read_finish);
|
||||
|
@ -1279,8 +1279,6 @@ static struct cg_usb_device *free_cgusb(struct cg_usb_device *cgusb)
|
||||
|
||||
void usb_uninit(struct cgpu_info *cgpu)
|
||||
{
|
||||
int err;
|
||||
|
||||
applog(LOG_DEBUG, "USB uninit %s%i",
|
||||
cgpu->drv->name, cgpu->device_id);
|
||||
|
||||
@ -1288,7 +1286,7 @@ void usb_uninit(struct cgpu_info *cgpu)
|
||||
// if release_cgpu() was called due to a USB NODEV(err)
|
||||
if (!cgpu->usbdev)
|
||||
return;
|
||||
err = libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface);
|
||||
libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface);
|
||||
libusb_close(cgpu->usbdev->handle);
|
||||
cgpu->usbdev = free_cgusb(cgpu->usbdev);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user