|
@@ -20,6 +20,7 @@
|
|
|
#include "libbitfury.h"
|
|
#include "libbitfury.h"
|
|
|
#include "logging.h"
|
|
#include "logging.h"
|
|
|
#include "lowlevel.h"
|
|
#include "lowlevel.h"
|
|
|
|
|
+#include "lowl-usb.h"
|
|
|
#include "miner.h"
|
|
#include "miner.h"
|
|
|
|
|
|
|
|
#define HASHBUSTER_USB_PRODUCT "HashBuster"
|
|
#define HASHBUSTER_USB_PRODUCT "HashBuster"
|
|
@@ -200,6 +201,7 @@ bool hashbuster2_lowl_probe(const struct lowlevel_device_info * const info)
|
|
|
if (unlikely(!chip_n))
|
|
if (unlikely(!chip_n))
|
|
|
{
|
|
{
|
|
|
applog(LOG_WARNING, "%s: No chips found on %s", __func__, serial);
|
|
applog(LOG_WARNING, "%s: No chips found on %s", __func__, serial);
|
|
|
|
|
+fail:
|
|
|
free(port);
|
|
free(port);
|
|
|
free(serial);
|
|
free(serial);
|
|
|
libusb_release_interface(h, 0);
|
|
libusb_release_interface(h, 0);
|
|
@@ -207,6 +209,9 @@ bool hashbuster2_lowl_probe(const struct lowlevel_device_info * const info)
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (bfg_claim_libusb(&hashbuster2_drv, true, dev))
|
|
|
|
|
+ goto fail;
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
devicelist = malloc(sizeof(*devicelist) * chip_n);
|
|
devicelist = malloc(sizeof(*devicelist) * chip_n);
|
|
|
for (j = 0; j < chip_n; ++j)
|
|
for (j = 0; j < chip_n; ++j)
|