mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Pass fd to avalon_idle.
This commit is contained in:
parent
664fd5b4a1
commit
ee4d72e338
@ -378,10 +378,10 @@ static void avalon_clear_readbuf(int fd)
|
|||||||
} while (ret > 0);
|
} while (ret > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void avalon_idle(struct cgpu_info *avalon)
|
static void avalon_idle(struct cgpu_info *avalon, int fd)
|
||||||
{
|
{
|
||||||
struct avalon_info *info = avalon->device_data;
|
struct avalon_info *info = avalon->device_data;
|
||||||
int i, fd = avalon->device_fd;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < info->miner_count; i++) {
|
for (i = 0; i < info->miner_count; i++) {
|
||||||
struct avalon_task at;
|
struct avalon_task at;
|
||||||
@ -419,7 +419,7 @@ static int avalon_reset(struct cgpu_info *avalon, int fd)
|
|||||||
p.tv_nsec = AVALON_RESET_PITCH;
|
p.tv_nsec = AVALON_RESET_PITCH;
|
||||||
nanosleep(&p, NULL);
|
nanosleep(&p, NULL);
|
||||||
avalon_clear_readbuf(fd);
|
avalon_clear_readbuf(fd);
|
||||||
avalon_idle(avalon);
|
avalon_idle(avalon, fd);
|
||||||
/* Reset again, then check result */
|
/* Reset again, then check result */
|
||||||
ret = avalon_write(fd, "ad", 2);
|
ret = avalon_write(fd, "ad", 2);
|
||||||
if (unlikely(ret == AVA_SEND_ERROR))
|
if (unlikely(ret == AVA_SEND_ERROR))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user