Commit 9eaf90b2d35b21c79e74b840169fabff6322abda

Con Kolivas 2014-02-24T01:43:05

Do a clear readbuf on any hfa reset in case the device has not yet cleanly shut down.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 5e40ca4..0bd7f85 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -368,6 +368,9 @@ resend:
 	if (unlikely(hashfast->usbinfo.nodev))
 		return false;
 
+	if (!hfa_clear_readbuf(hashfast))
+		return false;
+
 	if (!hfa_send_packet(hashfast, (struct hf_header *)hu, HF_USB_CMD(OP_USB_INIT)))
 		return false;