Browse Source

gridseed: Allow specifying an arbitrary number of chips with --set gsd:chips=X

Nate Woolls 11 years ago
parent
commit
1283519b5d
1 changed files with 10 additions and 3 deletions
  1. 10 3
      driver-gridseed.c

+ 10 - 3
driver-gridseed.c

@@ -255,11 +255,11 @@ int64_t gridseed_scanhash(struct thr_info *thr, struct work *work, int64_t __may
 static
 static
 char *gridseed_set_device(struct cgpu_info *device, char *option, char *setting, char *replybuf)
 char *gridseed_set_device(struct cgpu_info *device, char *option, char *setting, char *replybuf)
 {
 {
+	int val = atoi(setting);
+	struct gc3355_orb_info *info = device->device_data;
+
 	if (strcasecmp(option, "clock") == 0)
 	if (strcasecmp(option, "clock") == 0)
 	{
 	{
-		int val = atoi(setting);
-		
-		struct gc3355_orb_info *info = (struct gc3355_orb_info *)(device->device_data);
 		info->freq = val;
 		info->freq = val;
 		int fd = device->device_fd;
 		int fd = device->device_fd;
 		
 		
@@ -267,6 +267,13 @@ char *gridseed_set_device(struct cgpu_info *device, char *option, char *setting,
 		
 		
 		return NULL;
 		return NULL;
 	}
 	}
+
+	if (strcasecmp(option, "chips") == 0)
+	{
+		info->chips = val;
+
+		return NULL;
+	}
 	
 	
 	sprintf(replybuf, "Unknown option: %s", option);
 	sprintf(replybuf, "Unknown option: %s", option);
 	return replybuf;
 	return replybuf;