Commit 07fca3e289bb7c0f58c3cea4b75e598e4b2690fd

Con Kolivas 2012-08-12T10:29:34

The bitforce buffer is cleared and hw error count incremented on return from a failed send_work already so no need to do it within the send_work function.

diff --git a/driver-bitforce.c b/driver-bitforce.c
index bacac16..93556ee 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -421,8 +421,6 @@ re_send:
 			goto re_send;
 		}
 		applog(LOG_ERR, "BFL%i: Error: Send work reports: %s", bitforce->device_id, pdevbuf);
-		bitforce->hw_errors++;
-		bitforce_clear_buffer(bitforce);
 		return false;
 	}
 
@@ -463,8 +461,6 @@ re_send:
 
 	if (unlikely(strncasecmp(pdevbuf, "OK", 2))) {
 		applog(LOG_ERR, "BFL%i: Error: Send block data reports: %s", bitforce->device_id, pdevbuf);
-		bitforce->hw_errors++;
-		bitforce_clear_buffer(bitforce);
 		return false;
 	}