Commit f5679aaa61470b91ed9d36041f6c31d20697a387

Con Kolivas 2013-10-21T12:50:45

Check for nodev on hashfast driver and disable it if it has disappeared.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-hashfast.c b/driver-hashfast.c
index a730159..cae796d 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -688,6 +688,12 @@ static int64_t hfa_scanwork(struct thr_info *thr)
 	int64_t hashes;
 	int jobs, ret;
 
+	if (unlikely(hashfast->usbinfo.nodev)) {
+		applog(LOG_WARNING, "HFA %d: device disappeared, disabling",
+		       hashfast->device_id);
+		return -1;
+	}
+
 	if (unlikely(thr->work_restart)) {
 restart:
 		ret = hfa_send_frame(hashfast, HF_USB_CMD(OP_WORK_RESTART), 0, (uint8_t *)NULL, 0);