|
|
|
@ -248,7 +248,7 @@ static int64_t bitfury_scanwork(struct thr_info *thr)
@@ -248,7 +248,7 @@ static int64_t bitfury_scanwork(struct thr_info *thr)
|
|
|
|
|
cgtime(&tv_now); |
|
|
|
|
ms_diff = 600 - ms_tdiff(&tv_now, &info->tv_start); |
|
|
|
|
if (ms_diff > 0) { |
|
|
|
|
usb_read_timeout(bitfury, info->buf, 512, &amount, ms_diff, C_BF1_GETRES); |
|
|
|
|
usb_read_timeout_cancellable(bitfury, info->buf, 512, &amount, ms_diff, C_BF1_GETRES); |
|
|
|
|
info->tot += amount; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -261,8 +261,8 @@ static int64_t bitfury_scanwork(struct thr_info *thr)
@@ -261,8 +261,8 @@ static int64_t bitfury_scanwork(struct thr_info *thr)
|
|
|
|
|
ms_diff = BF1WAIT - ms_tdiff(&tv_now, &info->tv_start); |
|
|
|
|
if (unlikely(ms_diff < 10)) |
|
|
|
|
ms_diff = 10; |
|
|
|
|
usb_read_once_timeout(bitfury, info->buf + info->tot, BF1MSGSIZE, |
|
|
|
|
&amount, ms_diff, C_BF1_GETRES); |
|
|
|
|
usb_read_once_timeout_cancellable(bitfury, info->buf + info->tot, BF1MSGSIZE, |
|
|
|
|
&amount, ms_diff, C_BF1_GETRES); |
|
|
|
|
info->tot += amount; |
|
|
|
|
while (amount) { |
|
|
|
|
usb_read_once_timeout(bitfury, info->buf + info->tot, 512, &amount, 10, C_BF1_GETRES); |
|
|
|
|