mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Do avalon_reset after info structure is set up.
This commit is contained in:
parent
930317e123
commit
e2578033cb
@ -615,13 +615,6 @@ static bool avalon_detect_one(const char *devpath)
|
|||||||
avalon->threads = AVALON_MINER_THREADS;
|
avalon->threads = AVALON_MINER_THREADS;
|
||||||
add_cgpu(avalon);
|
add_cgpu(avalon);
|
||||||
|
|
||||||
ret = avalon_reset(avalon, fd);
|
|
||||||
if (ret) {
|
|
||||||
; /* FIXME: I think IT IS avalon and wait on reset;
|
|
||||||
* avalon_close(fd);
|
|
||||||
* return false; */
|
|
||||||
}
|
|
||||||
|
|
||||||
avalon_infos = realloc(avalon_infos,
|
avalon_infos = realloc(avalon_infos,
|
||||||
sizeof(struct avalon_info *) *
|
sizeof(struct avalon_info *) *
|
||||||
(total_devices + 1));
|
(total_devices + 1));
|
||||||
@ -636,8 +629,6 @@ static bool avalon_detect_one(const char *devpath)
|
|||||||
avalon->device_data = avalon_infos[avalon->device_id];
|
avalon->device_data = avalon_infos[avalon->device_id];
|
||||||
info = avalon->device_data;
|
info = avalon->device_data;
|
||||||
|
|
||||||
memset(info, 0, sizeof(struct avalon_info));
|
|
||||||
|
|
||||||
info->baud = baud;
|
info->baud = baud;
|
||||||
info->miner_count = miner_count;
|
info->miner_count = miner_count;
|
||||||
info->asic_count = asic_count;
|
info->asic_count = asic_count;
|
||||||
@ -657,6 +648,13 @@ static bool avalon_detect_one(const char *devpath)
|
|||||||
|
|
||||||
avalon->device_fd = -1;
|
avalon->device_fd = -1;
|
||||||
|
|
||||||
|
ret = avalon_reset(avalon, fd);
|
||||||
|
if (ret) {
|
||||||
|
; /* FIXME: I think IT IS avalon and wait on reset;
|
||||||
|
* avalon_close(fd);
|
||||||
|
* return false; */
|
||||||
|
}
|
||||||
|
|
||||||
avalon_close(fd);
|
avalon_close(fd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user