Commit e42330682cc23d14cea44b567302f18bf905ee95

Con Kolivas 2013-12-29T22:40:35

Discard bad crc packets for hashfast driver instead of trying to process them.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 605ea95..4c04643 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -491,8 +491,10 @@ static bool hfa_get_packet(struct cgpu_info *hashfast, struct hf_header *h)
 	if (unlikely(!ret))
 		goto out;
 	if (unlikely(h->crc8 != hcrc)) {
-		applog(LOG_WARNING, "HFA %d: Bad CRC %d vs %d, attempting to process anyway",
+		applog(LOG_WARNING, "HFA %d: Bad CRC %d vs %d, discarding packet",
 		       hashfast->device_id, h->crc8, hcrc);
+		ret = false;
+		goto out;
 	}
 	if (h->data_length > 0)
 		ret = hfa_get_data(hashfast, (char *)(h + 1), h->data_length);