From 3c707202cfbdfba0aa3bd221c77647392a53b56e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 18 Aug 2013 16:46:27 +1000 Subject: [PATCH] Use 100ms delay between checking for results on all bflsc devices as the buffering of results mean checking more frequently just wastes CPU and causes more lock contention for only marginally better latencies. --- driver-bflsc.c | 5 +---- driver-bflsc.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/driver-bflsc.c b/driver-bflsc.c index 5eca2a8a..e018e8e7 100644 --- a/driver-bflsc.c +++ b/driver-bflsc.c @@ -816,7 +816,7 @@ reinit: } sc_info->scan_sleep_time = BAS_SCAN_TIME; - sc_info->results_sleep_time = BAS_RES_TIME; + sc_info->results_sleep_time = BFLSC_RES_TIME; sc_info->default_ms_work = BAS_WORK_TIME; latency = BAS_LATENCY; @@ -827,7 +827,6 @@ reinit: if (sc_info->sc_count > 1) { newname = BFLSC_MINIRIG; sc_info->scan_sleep_time = BAM_SCAN_TIME; - sc_info->results_sleep_time = BAM_RES_TIME; sc_info->default_ms_work = BAM_WORK_TIME; bflsc->usbdev->ident = IDENT_BAM; latency = BAM_LATENCY; @@ -835,14 +834,12 @@ reinit: if (sc_info->sc_devs[0].engines < 34) { // 16 * 2 + 2 newname = BFLSC_JALAPENO; sc_info->scan_sleep_time = BAJ_SCAN_TIME; - sc_info->results_sleep_time = BAJ_RES_TIME; sc_info->default_ms_work = BAJ_WORK_TIME; bflsc->usbdev->ident = IDENT_BAJ; latency = BAJ_LATENCY; } else if (sc_info->sc_devs[0].engines < 130) { // 16 * 8 + 2 newname = BFLSC_LITTLESINGLE; sc_info->scan_sleep_time = BAL_SCAN_TIME; - sc_info->results_sleep_time = BAL_RES_TIME; sc_info->default_ms_work = BAL_WORK_TIME; bflsc->usbdev->ident = IDENT_BAL; latency = BAL_LATENCY; diff --git a/driver-bflsc.h b/driver-bflsc.h index 18930780..6d8bda69 100644 --- a/driver-bflsc.h +++ b/driver-bflsc.h @@ -314,13 +314,10 @@ struct SaveString { // SCAN_TIME - delay after sending work // RES_TIME - delay between checking for results #define BAM_SCAN_TIME 20 -#define BAM_RES_TIME 2 #define BAS_SCAN_TIME 360 -#define BAS_RES_TIME 36 #define BAL_SCAN_TIME 720 -#define BAL_RES_TIME 72 #define BAJ_SCAN_TIME 1000 -#define BAJ_RES_TIME 100 +#define BFLSC_RES_TIME 100 #define BFLSC_MAX_SLEEP 2000 #define BAJ_LATENCY LATENCY_STD