Commit c9197a75a40ae5c8aa48221e48882c1ce508fb48

Con Kolivas 2014-02-21T02:44:09

Give a nodev error if we have already set nodev in hfa clear readbuf to avoid further usb comms attempts.

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 b8e740a..a25f846 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -464,8 +464,10 @@ static bool hfa_clear_readbuf(struct cgpu_info *hashfast)
 	char buf[512];
 
 	do {
-		if (hashfast->usbinfo.nodev)
+		if (hashfast->usbinfo.nodev) {
+			ret = LIBUSB_ERROR_NO_DEVICE;
 			break;
+		}
 		ret = usb_read(hashfast, buf, 512, &amount, C_HF_CLEAR_READ);
 	} while (!ret || amount);