|
|
@@ -1149,6 +1149,8 @@ static bool bitforce_thread_init(struct thr_info *thr)
|
|
|
struct bitforce_init_data *initdata = bitforce->cgpu_data;
|
|
|
bool sc = initdata->sc;
|
|
|
int xlink_id = 0;
|
|
|
+ char buf[100];
|
|
|
+ int fd = bitforce->device_fd;
|
|
|
|
|
|
for ( ; bitforce; bitforce = bitforce->next_proc)
|
|
|
{
|
|
|
@@ -1200,10 +1202,14 @@ static bool bitforce_thread_init(struct thr_info *thr)
|
|
|
}
|
|
|
bitforce->status = LIFE_INIT2;
|
|
|
|
|
|
+ // Clear job queue to start fresh; ignore response
|
|
|
+ bitforce_cmd1(fd, data->xlink_id, buf, sizeof(buf), "ZQX");
|
|
|
+
|
|
|
while (xlink_id < 31 && !(initdata->devmask & (1 << ++xlink_id)))
|
|
|
{}
|
|
|
}
|
|
|
|
|
|
+ // NOTE: This doesn't restore the first processor, but it does get us the last one; this is sufficient for the delay debug and start of the next loop below
|
|
|
bitforce = thr->cgpu;
|
|
|
|
|
|
free(initdata);
|
|
|
@@ -1214,6 +1220,10 @@ static bool bitforce_thread_init(struct thr_info *thr)
|
|
|
applog(LOG_DEBUG, "%s: Delaying start by %dms", bitforce->dev_repr, wait / 1000);
|
|
|
nmsleep(wait);
|
|
|
|
|
|
+ // Clear results queue last, to start fresh; ignore response
|
|
|
+ for (bitforce = bitforce->device; bitforce; bitforce = bitforce->next_proc)
|
|
|
+ bitforce_zox(thr, "ZOX");
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|