Browse Source

titan: Properly set work_accepted flag

Vitalii Demianets 11 years ago
parent
commit
2fcec022d1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      titan-asic.c

+ 3 - 1
titan-asic.c

@@ -30,7 +30,9 @@ bool knc_titan_set_work(const char *repr, void * const ctx, int channel, int die
 
 
 	request_length = knc_prepare_titan_setwork(request, die, core, slot, work, urgent);
 	request_length = knc_prepare_titan_setwork(request, die, core, slot, work, urgent);
 	status = knc_syncronous_transfer(ctx, channel, request_length, request, response_length, response);
 	status = knc_syncronous_transfer(ctx, channel, request_length, request, response_length, response);
-	if (status != KNC_ACCEPTED) {
+	if (status == KNC_ACCEPTED) {
+		*work_accepted = true;
+	} else {
 		*work_accepted = false;
 		*work_accepted = false;
 		if (response[0] == 0x7f) {
 		if (response[0] == 0x7f) {
 			applog(LOG_DEBUG, "%s[%d:%d]: Core disabled", repr, channel, die);
 			applog(LOG_DEBUG, "%s[%d:%d]: Core disabled", repr, channel, die);