Browse Source

bitforce: Wait to clear job queue (at init) until we have actually opened the device

Luke Dashjr 11 years ago
parent
commit
14a0263417
1 changed files with 2 additions and 4 deletions
  1. 2 4
      driver-bitforce.c

+ 2 - 4
driver-bitforce.c

@@ -1720,9 +1720,6 @@ static bool bitforce_thread_init(struct thr_info *thr)
 			}
 			else
 				bitforce_change_mode(bitforce, BFP_WORK);
-			
-			// Clear job queue to start fresh; ignore response
-			bitforce_cmd1b(bitforce, buf, sizeof(buf), "ZQX", 3);
 		}
 		else
 		{
@@ -1785,7 +1782,7 @@ static bool bitforce_thread_init(struct thr_info *thr)
 	
 	if (style != BFS_FPGA)
 	{
-		// Clear results queue last, to start fresh; ignore response
+		// Clear job and results queue, to start fresh; ignore response
 		int last_xlink_id = -1;
 		for (bitforce = bitforce->device; bitforce; bitforce = bitforce->next_proc)
 		{
@@ -1794,6 +1791,7 @@ static bool bitforce_thread_init(struct thr_info *thr)
 				continue;
 			last_xlink_id = data->xlink_id;
 			thr = bitforce->thr[0];
+			bitforce_cmd1b(bitforce, buf, sizeof(buf), "ZQX", 3);
 			bitforce_zox(thr, "ZOX");
 		}
 	}