|
@@ -47,17 +47,19 @@ int bitfury_autodetect()
|
|
|
int chip_n;
|
|
int chip_n;
|
|
|
struct cgpu_info *bitfury_info;
|
|
struct cgpu_info *bitfury_info;
|
|
|
|
|
|
|
|
- bitfury_info = calloc(1, sizeof(struct cgpu_info));
|
|
|
|
|
- bitfury_info->drv = &bitfury_drv;
|
|
|
|
|
- bitfury_info->threads = 1;
|
|
|
|
|
-
|
|
|
|
|
applog(LOG_INFO, "INFO: bitfury_detect");
|
|
applog(LOG_INFO, "INFO: bitfury_detect");
|
|
|
spi_init();
|
|
spi_init();
|
|
|
if (!sys_spi)
|
|
if (!sys_spi)
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
+
|
|
|
|
|
+ bitfury_info = calloc(1, sizeof(struct cgpu_info));
|
|
|
|
|
+ bitfury_info->drv = &bitfury_drv;
|
|
|
|
|
+ bitfury_info->threads = 1;
|
|
|
|
|
+
|
|
|
chip_n = libbitfury_detectChips1(sys_spi);
|
|
chip_n = libbitfury_detectChips1(sys_spi);
|
|
|
if (!chip_n) {
|
|
if (!chip_n) {
|
|
|
applog(LOG_WARNING, "No Bitfury chips detected!");
|
|
applog(LOG_WARNING, "No Bitfury chips detected!");
|
|
|
|
|
+ free(bitfury_info);
|
|
|
return 0;
|
|
return 0;
|
|
|
} else {
|
|
} else {
|
|
|
applog(LOG_WARNING, "BITFURY: %d chips detected!", chip_n);
|
|
applog(LOG_WARNING, "BITFURY: %d chips detected!", chip_n);
|