1
0
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:
Kano 2013-05-18 01:56:00 +10:00
parent 250e435313
commit 5e588d87f4
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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);
}