Commit 752bfa768dc66d2da7a8b59c836cfeaef9c3f460

Con Kolivas 2014-01-06T12:56:50

Status 0x30 should never happen with spi transfers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/mcp2210.c b/mcp2210.c
index 501c35e..e7c97db 100644
--- a/mcp2210.c
+++ b/mcp2210.c
@@ -342,6 +342,12 @@ retry:
 				memcpy(data + offset, buf + 4, *length);
 				offset += *length;
 			}
+			if (status == 0x30) {
+				/* This shouldn't happen */
+				applog(LOG_DEBUG, "%s %d: SPI expecting more data inappropriately",
+				       cgpu->drv->name, cgpu->device_id);
+				return false;
+			}
 			if (offset < orig_len) {
 				*length = 0;
 				goto retry;