|
|
@ -710,32 +710,14 @@ static bool klondike_init(struct cgpu_info *klncgpu) |
|
|
|
|
|
|
|
|
|
|
|
// boundaries are checked by device, with valid values returned
|
|
|
|
// boundaries are checked by device, with valid values returned
|
|
|
|
if (opt_klondike_options != NULL) { |
|
|
|
if (opt_klondike_options != NULL) { |
|
|
|
int hashclock, fantarget; |
|
|
|
int hashclock; |
|
|
|
double temp1, temp2; |
|
|
|
double temptarget; |
|
|
|
|
|
|
|
|
|
|
|
sscanf(opt_klondike_options, "%d:%lf:%lf:%d", |
|
|
|
sscanf(opt_klondike_options, "%d:%lf", &hashclock, &temptarget); |
|
|
|
&hashclock, |
|
|
|
|
|
|
|
&temp1, &temp2, |
|
|
|
|
|
|
|
&fantarget); |
|
|
|
|
|
|
|
SET_HASHCLOCK(kline.cfg.hashclock, hashclock); |
|
|
|
SET_HASHCLOCK(kline.cfg.hashclock, hashclock); |
|
|
|
kline.cfg.temptarget = cvtCToKln(temp1); |
|
|
|
kline.cfg.temptarget = cvtCToKln(temptarget); |
|
|
|
kline.cfg.tempcritical = cvtCToKln(temp2); |
|
|
|
kline.cfg.tempcritical = 0; // hard code for old firmware
|
|
|
|
if (fantarget < 0) { |
|
|
|
kline.cfg.fantarget = 0xff; // hard code for old firmware
|
|
|
|
applog(LOG_WARNING, |
|
|
|
|
|
|
|
"%s%i: %s options invalid fantarget < 0 using 0", |
|
|
|
|
|
|
|
klncgpu->drv->name, |
|
|
|
|
|
|
|
klncgpu->device_id, |
|
|
|
|
|
|
|
klncgpu->drv->dname); |
|
|
|
|
|
|
|
fantarget = 0; |
|
|
|
|
|
|
|
} else if (fantarget > 100) { |
|
|
|
|
|
|
|
applog(LOG_WARNING, |
|
|
|
|
|
|
|
"%s%i: %s options invalid fantarget > 100 using 100", |
|
|
|
|
|
|
|
klncgpu->drv->name, |
|
|
|
|
|
|
|
klncgpu->device_id, |
|
|
|
|
|
|
|
klncgpu->drv->dname); |
|
|
|
|
|
|
|
fantarget = 100; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
kline.cfg.fantarget = (int)(255 * fantarget / 100); |
|
|
|
|
|
|
|
size = sizeof(kline.cfg) - 2; |
|
|
|
size = sizeof(kline.cfg) - 2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|