Commit 93d4c09c66061e504d237e3a350b4962400fc2ed

Con Kolivas 2013-09-27T10:54:24

Perform interrupt read after close message on BF1 as per serial close.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 5cd83a2..18a57b6 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -40,9 +40,13 @@ static void bitfury_open(struct cgpu_info *bitfury)
 
 static void bitfury_close(struct cgpu_info *bitfury)
 {
+	char buf[8];
+	int amount;
+
 	bitfury_empty_buffer(bitfury);
 	/* Magic close sequence */
 	usb_transfer(bitfury, 0x21, 0x22, 0, 0, C_BF1_CLOSE);
+	usb_read_ii(bitfury, 0, buf, 8, &amount, C_BF1_IFLUSH);
 	bitfury_empty_buffer(bitfury);
 	usb_transfer(bitfury, 0x23, 0x08, 0x9053, 1, C_BF1_CLOSE);
 	bitfury_empty_buffer(bitfury);