Merge branch 'master' of github.com:ckolivas/cgminer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/01-cgminer.rules b/01-cgminer.rules
index 76f776e..b54984e 100644
--- a/01-cgminer.rules
+++ b/01-cgminer.rules
@@ -43,3 +43,6 @@ ATTRS{idVendor}=="4254", ATTRS{idProduct}=="4153", SUBSYSTEM=="usb", ACTION=="ad
# Cointerra
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="0003", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+
+# Drillbit Thumb
+ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2404", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
diff --git a/API-README b/API-README
index 835ab24..3cd2929 100644
--- a/API-README
+++ b/API-README
@@ -100,7 +100,7 @@ The STATUS section is:
Standard long time of request in seconds
Code=N
- Each unique reply has a unigue Code (See api.c - #define MSG_NNNNNN)
+ Each unique reply has a unique Code (See api.c - #define MSG_NNNNNN)
Msg=string
Message matching the Code value N
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8227416..01083e5 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1814,12 +1814,20 @@ static struct api_data *hfa_api_stats(struct cgpu_info *cgpu)
root = api_add_int(root, "max rx buf", &varint, true);
for (i = 0; i < info->asic_count; i++) {
- struct hf_long_statistics *l = &info->die_statistics[i];
- struct hf_g1_die_data *d = &info->die_status[i];
+ struct hf_long_statistics *l;
+ struct hf_g1_die_data *d;
char which[16];
double val;
int j;
+ if (!info->die_statistics || !info->die_status)
+ continue;
+ l = &info->die_statistics[i];
+ if (!l)
+ continue;
+ d = &info->die_status[i];
+ if (!d)
+ continue;
snprintf(which, sizeof(which), "Asic%d", i);
snprintf(buf, sizeof(buf), "%s hash clockrate", which);