From f5679aaa61470b91ed9d36041f6c31d20697a387 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 21 Oct 2013 12:50:45 +1100 Subject: [PATCH] Check for nodev on hashfast driver and disable it if it has disappeared. --- driver-hashfast.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/driver-hashfast.c b/driver-hashfast.c index a7301599..cae796d0 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);