mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 06:48:05 +00:00
bflsc & icarus use usb_ftdi_set_latency
This commit is contained in:
parent
58bb4d486d
commit
6aed9a5122
@ -565,25 +565,6 @@ static bool bflsc_qres(struct cgpu_info *bflsc, char *buf, size_t bufsiz, int de
|
|||||||
return readok;
|
return readok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __set_latency(struct cgpu_info *bflsc)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
|
|
||||||
if (bflsc->usbinfo.nodev)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Latency
|
|
||||||
err = usb_transfer(bflsc, FTDI_TYPE_OUT, FTDI_REQUEST_LATENCY,
|
|
||||||
bflsc->usbdev->found->latency,
|
|
||||||
bflsc->usbdev->found->interface, C_LATENCY);
|
|
||||||
|
|
||||||
applog(LOG_DEBUG, "%s%i: latency got err %d",
|
|
||||||
bflsc->drv->name, bflsc->device_id, err);
|
|
||||||
|
|
||||||
if (bflsc->usbinfo.nodev)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __bflsc_initialise(struct cgpu_info *bflsc)
|
static void __bflsc_initialise(struct cgpu_info *bflsc)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@ -604,7 +585,7 @@ static void __bflsc_initialise(struct cgpu_info *bflsc)
|
|||||||
if (bflsc->usbinfo.nodev)
|
if (bflsc->usbinfo.nodev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
__set_latency(bflsc);
|
usb_ftdi_set_latency(bflsc);
|
||||||
|
|
||||||
if (bflsc->usbinfo.nodev)
|
if (bflsc->usbinfo.nodev)
|
||||||
return;
|
return;
|
||||||
@ -944,7 +925,7 @@ reinit:
|
|||||||
|
|
||||||
if (latency != bflsc->usbdev->found->latency) {
|
if (latency != bflsc->usbdev->found->latency) {
|
||||||
bflsc->usbdev->found->latency = latency;
|
bflsc->usbdev->found->latency = latency;
|
||||||
__set_latency(bflsc);
|
usb_ftdi_set_latency(bflsc);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < sc_info->sc_count; i++)
|
for (i = 0; i < sc_info->sc_count; i++)
|
||||||
|
@ -256,10 +256,6 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
|
|||||||
case IDENT_LLT:
|
case IDENT_LLT:
|
||||||
case IDENT_CMR1:
|
case IDENT_CMR1:
|
||||||
case IDENT_CMR2:
|
case IDENT_CMR2:
|
||||||
if (icarus->usbdev->found->latency == LATENCY_UNUSED)
|
|
||||||
quit(1, "%s: cgid %d invalid latency (UNUSED)",
|
|
||||||
icarus->drv->name, icarus->cgminer_id);
|
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_RESET, FTDI_VALUE_RESET,
|
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_RESET, FTDI_VALUE_RESET,
|
||||||
icarus->usbdev->found->interface, C_RESET);
|
icarus->usbdev->found->interface, C_RESET);
|
||||||
@ -268,9 +264,7 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Latency
|
// Latency
|
||||||
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_LATENCY,
|
usb_ftdi_set_latency(icarus);
|
||||||
icarus->usbdev->found->latency,
|
|
||||||
icarus->usbdev->found->interface, C_LATENCY);
|
|
||||||
|
|
||||||
if (icarus->usbinfo.nodev)
|
if (icarus->usbinfo.nodev)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user