Browse Source

Pass fd to avalon_idle.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
ee4d72e338
  1. 6
      driver-avalon.c

6
driver-avalon.c

@ -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…
Cancel
Save