Browse Source

Bugfix: knc: Only try to re-enable cores after we've actually asserted them as disabled, otherwise we won't actually assert the enable either

Luke Dashjr 12 years ago
parent
commit
b81a38d136
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-knc.c

+ 2 - 1
driver-knc.c

@@ -762,7 +762,8 @@ bool knc_get_stats(struct cgpu_info * const cgpu)
 		knccore->volt = volt;
 		knccore->current = current;
 		
-		if (proc->deven == DEV_DISABLED && timer_passed(&knccore->enable_at, &tv_now))
+		// NOTE: We need to check _mt_disable_called because otherwise enabling won't assert it to i2c (it's false when getting stats for eg proc 0 before proc 1+ haven't initialised completely yet)
+		if (proc->deven == DEV_DISABLED && timer_passed(&knccore->enable_at, &tv_now) && thr->_mt_disable_called)
 		{
 			knccore->hwerr_in_row = 0;
 			proc_enable(proc);