|
|
@@ -77,15 +77,9 @@ int bf1_rehash(unsigned char *midstate, unsigned m7, unsigned ntime, unsigned nb
|
|
|
if (out32[7] == 0)
|
|
|
{
|
|
|
bin2hex(hex, out, 32);
|
|
|
- applog(LOG_INFO, "! MS0: %08x, m7: %08x, ntime: %08x, nbits: %08x, nnonce: %08x\n\t\t\t out: %s\n", mid32[0], m7, ntime, nbits, nnonce, hex);
|
|
|
+ applog(LOG_DEBUG, "! MS0: %08x, m7: %08x, ntime: %08x, nbits: %08x, nnonce: %08x\n\t\t\t out: %s\n", mid32[0], m7, ntime, nbits, nnonce, hex);
|
|
|
return 1;
|
|
|
}
|
|
|
-#if 0
|
|
|
- else
|
|
|
- {
|
|
|
- applog(LOG_INFO, "DATA: %08X %08X %08X %08X", m7, ntime, nbits, nnonce);
|
|
|
- }
|
|
|
-#endif
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -161,7 +155,7 @@ static bool bf1_detect_one(const char *devpath)
|
|
|
if (unlikely(!info))
|
|
|
quit(1, "Failed to malloc bf1Info");
|
|
|
|
|
|
- applog(LOG_INFO, "Detect Bitfury BF1 device: %s", devpath);
|
|
|
+ applog(LOG_DEBUG, "Detect Bitfury BF1 device: %s", devpath);
|
|
|
info->baud = BF1_BAUD;
|
|
|
|
|
|
if (!bf1_detect_custom(devpath, &bf1_drv, info))
|
|
|
@@ -175,14 +169,14 @@ static bool bf1_detect_one(const char *devpath)
|
|
|
//------------------------------------------------------------------------------
|
|
|
static int bf1_detect_auto(void)
|
|
|
{
|
|
|
- applog(LOG_INFO, "Autodetect Bitfury BF1 devices");
|
|
|
+ applog(LOG_DEBUG, "Autodetect Bitfury BF1 devices");
|
|
|
return serial_autodetect(bf1_detect_one, "Bitfury_BF1");
|
|
|
}
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
static void bf1_detect()
|
|
|
{
|
|
|
- applog(LOG_INFO, "Searching for Bitfury BF1 devices");
|
|
|
+ applog(LOG_DEBUG, "Searching for Bitfury BF1 devices");
|
|
|
//serial_detect(&bf1_drv, bf1_detect_one);
|
|
|
serial_detect_auto(&bf1_drv, bf1_detect_one, bf1_detect_auto);
|
|
|
}
|
|
|
@@ -190,7 +184,7 @@ static void bf1_detect()
|
|
|
//------------------------------------------------------------------------------
|
|
|
static bool bf1_init(struct thr_info *thr)
|
|
|
{
|
|
|
- applog(LOG_INFO, "Bitfury BF1 init");
|
|
|
+ applog(LOG_DEBUG, "Bitfury BF1 init");
|
|
|
|
|
|
struct cgpu_info *bf1 = thr->cgpu;
|
|
|
struct BF1Info *info = (struct BF1Info *)bf1->device_data;
|
|
|
@@ -262,7 +256,7 @@ static void bf1_process_results(struct thr_info *thr, struct work *work)
|
|
|
uint32_t nonce = bf1_decnonce(state.nonce);
|
|
|
results[num_results++] = state.nonce;
|
|
|
|
|
|
- //applog(LOG_INFO, "Len: %d Cmd: %c State: %c Switched: %d Nonce: %08X", info->rx_len, info->rx_buffer[i], state->state, state->switched, nonce);
|
|
|
+ //applog(LOG_DEBUG, "Len: %d Cmd: %c State: %c Switched: %d Nonce: %08X", info->rx_len, info->rx_buffer[i], state->state, state->switched, nonce);
|
|
|
if(bf1_rehash(work->midstate, m7, ntime, nbits, nonce))
|
|
|
{
|
|
|
submit_nonce(thr, work, nonce);
|
|
|
@@ -324,7 +318,7 @@ static int64_t bf1_scanwork(struct thr_info *thr)
|
|
|
memcpy(sendbuf + 33, info->work->data + 64, 12);
|
|
|
write(board->device_fd, sendbuf, sizeof(sendbuf));
|
|
|
|
|
|
- applog(LOG_INFO, "Work Task sending: %d", info->work->id);
|
|
|
+ applog(LOG_DEBUG, "Work Task sending: %d", info->work->id);
|
|
|
while(1)
|
|
|
{
|
|
|
uint8_t buffer[7];
|
|
|
@@ -334,20 +328,20 @@ static int64_t bf1_scanwork(struct thr_info *thr)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- applog(LOG_INFO, "Work Task sent");
|
|
|
+ applog(LOG_DEBUG, "Work Task sent");
|
|
|
while(1)
|
|
|
{
|
|
|
info->rx_len = serial_read(board->device_fd, info->rx_buffer, sizeof(info->rx_buffer));
|
|
|
if(info->rx_len > 0)
|
|
|
break;
|
|
|
}
|
|
|
- applog(LOG_INFO, "Work Task accepted");
|
|
|
+ applog(LOG_DEBUG, "Work Task accepted");
|
|
|
|
|
|
- applog(LOG_INFO, "Nonces sent back: %d", info->rx_len / 7);
|
|
|
+ applog(LOG_DEBUG, "Nonces sent back: %d", info->rx_len / 7);
|
|
|
/*
|
|
|
if(info->prev_work[1])
|
|
|
{
|
|
|
- applog(LOG_INFO, "PREV[1]");
|
|
|
+ applog(LOG_DEBUG, "PREV[1]");
|
|
|
bf1_process_results(thr, info->prev_work[1]);
|
|
|
work_completed(board, info->prev_work[1]);
|
|
|
info->prev_work[1] = 0;
|
|
|
@@ -355,7 +349,7 @@ static int64_t bf1_scanwork(struct thr_info *thr)
|
|
|
*/
|
|
|
if(info->prev_work[0])
|
|
|
{
|
|
|
- applog(LOG_INFO, "PREV[0]");
|
|
|
+ applog(LOG_DEBUG, "PREV[0]");
|
|
|
bf1_process_results(thr, info->prev_work[0]);
|
|
|
}
|
|
|
info->prev_work[1] = info->prev_work[0];
|
|
|
@@ -364,7 +358,7 @@ static int64_t bf1_scanwork(struct thr_info *thr)
|
|
|
|
|
|
//hashes = 0xffffffff;
|
|
|
hashes = 0xBD000000;
|
|
|
- applog(LOG_INFO, "WORK completed");
|
|
|
+ applog(LOG_DEBUG, "WORK completed");
|
|
|
|
|
|
return hashes;
|
|
|
}
|
|
|
@@ -378,7 +372,7 @@ static void bf1_poll(struct thr_info *thr)
|
|
|
int len = 0;
|
|
|
len = serial_read(board->device_fd, rx_buf, sizeof(rx_buf));
|
|
|
|
|
|
- applog(LOG_INFO, "POLL: serial read: %d", len);
|
|
|
+ applog(LOG_DEBUG, "POLL: serial read: %d", len);
|
|
|
*/
|
|
|
struct timeval tv_now;
|
|
|
gettimeofday(&tv_now, NULL);
|