Remove unused statistics from hashfast driver struct and don't pack hashfast info structs since there is no need for them to match the device ones identically.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/driver-hashfast.c b/driver-hashfast.c
index faf859b..558a5e1 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -537,7 +537,8 @@ static void hfa_update_stats1(struct cgpu_info *hashfast, struct hashfast_info *
s1->usb_tx_endpointstalled += sd->usb_tx_endpointstalled;
s1->usb_tx_disconnected += sd->usb_tx_disconnected;
s1->usb_tx_suspended += sd->usb_tx_suspended;
-
+#if 0
+ /* We don't care about UART stats so they're not in our struct */
s1->uart_tx_queue_dma += sd->uart_tx_queue_dma;
s1->uart_tx_interrupts += sd->uart_tx_interrupts;
@@ -549,7 +550,7 @@ static void hfa_update_stats1(struct cgpu_info *hashfast, struct hashfast_info *
s1->uart_rx_bad_dma += sd->uart_rx_bad_dma;
s1->uart_rx_short_dma += sd->uart_rx_short_dma;
s1->uart_rx_buffers_full += sd->uart_rx_buffers_full;
-
+#endif
if (sd->max_tx_buffers > s1->max_tx_buffers)
s1->max_tx_buffers = sd->max_tx_buffers;
if (sd->max_rx_buffers > s1->max_rx_buffers)
@@ -567,7 +568,7 @@ static void hfa_update_stats1(struct cgpu_info *hashfast, struct hashfast_info *
applog(LOG_DEBUG, " usb_tx_endpointstalled: %6d", sd->usb_tx_endpointstalled);
applog(LOG_DEBUG, " usb_tx_disconnected: %6d", sd->usb_tx_disconnected);
applog(LOG_DEBUG, " usb_tx_suspended: %6d", sd->usb_tx_suspended);
-
+#if 0
applog(LOG_DEBUG, " uart_tx_queue_dma: %6d", sd->uart_tx_queue_dma);
applog(LOG_DEBUG, " uart_tx_interrupts: %6d", sd->uart_tx_interrupts);
@@ -579,7 +580,7 @@ static void hfa_update_stats1(struct cgpu_info *hashfast, struct hashfast_info *
applog(LOG_DEBUG, " uart_rx_bad_dma: %6d", sd->uart_rx_bad_dma);
applog(LOG_DEBUG, " uart_rx_short_dma: %6d", sd->uart_rx_short_dma);
applog(LOG_DEBUG, " uart_rx_buffers_full: %6d", sd->uart_rx_buffers_full);
-
+#endif
applog(LOG_DEBUG, " max_tx_buffers: %6d", sd->max_tx_buffers);
applog(LOG_DEBUG, " max_rx_buffers: %6d", sd->max_rx_buffers);
diff --git a/driver-hashfast.h b/driver-hashfast.h
index 60fe98a..5d78025 100644
--- a/driver-hashfast.h
+++ b/driver-hashfast.h
@@ -19,18 +19,18 @@
#define HASHFAST_MINER_THREADS 1
#define HF_SEQUENCE_DISTANCE(tx,rx) ((tx)>=(rx)?((tx)-(rx)):(info->num_sequence+(tx)-(rx)))
-// Matching fields for hf_statistics, but large #'s for local accumulation, per-die
+// Matching fields for hf_statistics, but large #s for local accumulation, per-die
struct hf_long_statistics {
- uint64_t rx_header_crc; // Header CRC's
- uint64_t rx_body_crc; // Data CRC's
+ uint64_t rx_header_crc; // Header CRCs
+ uint64_t rx_body_crc; // Data CRCs
uint64_t rx_header_timeouts; // Header timeouts
uint64_t rx_body_timeouts; // Data timeouts
uint64_t core_nonce_fifo_full; // Core nonce Q overrun events
uint64_t array_nonce_fifo_full; // System nonce Q overrun events
uint64_t stats_overrun; // Overrun in statistics reporting
-} __attribute__((packed,aligned(4)));
+};
-// Matching fields for hf_usb_stats1, but large #'s for local accumulation, per device
+// Matching fields for hf_usb_stats1, but large #s for local accumulation, per device
struct hf_long_usb_stats1 {
// USB incoming
uint64_t usb_rx_preambles;
@@ -45,7 +45,8 @@ struct hf_long_usb_stats1 {
uint64_t usb_tx_endpointstalled;
uint64_t usb_tx_disconnected;
uint64_t usb_tx_suspended;
-
+#if 0
+ /* We don't care about UART stats */
// UART transmit
uint64_t uart_tx_queue_dma;
uint64_t uart_tx_interrupts;
@@ -59,10 +60,11 @@ struct hf_long_usb_stats1 {
uint64_t uart_rx_bad_dma;
uint64_t uart_rx_short_dma;
uint64_t uart_rx_buffers_full;
+#endif
uint8_t max_tx_buffers;
uint8_t max_rx_buffers;
-} __attribute__((packed,aligned(8)));
+};
struct hashfast_info {
int asic_count; // # of chips in the chain