Browse Source

icarus test nodev everywhere

nfactor-troky
Kano 12 years ago
parent
commit
5e588d87f4
  1. 3
      driver-icarus.c
  2. 4
      usbutils.c

3
driver-icarus.c

@ -330,6 +330,9 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct @@ -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);

4
usbutils.c

@ -1279,8 +1279,6 @@ static struct cg_usb_device *free_cgusb(struct cg_usb_device *cgusb) @@ -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) @@ -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…
Cancel
Save