From 589e08772e45a6676b19f20799928493b0e9a334 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 27 May 2013 11:11:44 +1000 Subject: [PATCH] Perform a mandatory reset if the avalon buffer signals it's full before it has queued its normal quota of work. --- driver-avalon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/driver-avalon.c b/driver-avalon.c index 1fd4b5a2..f5bafb8c 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -770,7 +770,9 @@ static void *avalon_send_tasks(void *userdata) applog(LOG_WARNING, "AVA%i: Buffer full before all work queued", avalon->device_id); - avalon->results -= avalon_get_work_count - j; + dev_error(avalon, REASON_DEV_COMMS_ERROR); + avalon_reset(avalon, fd); + avalon_idle(avalon, info, fd); break; } @@ -795,6 +797,7 @@ static void *avalon_send_tasks(void *userdata) avalon_idle(avalon, info, fd); } } + avalon_rotate_array(avalon); pthread_cond_signal(&info->qcond); mutex_unlock(&info->qlock);