Browse Source

antminer: Adapt default configuration to work with U3 as well as U1/U2

Luke Dashjr 11 years ago
parent
commit
8022f7dd62
1 changed files with 5 additions and 2 deletions
  1. 5 2
      driver-antminer.c

+ 5 - 2
driver-antminer.c

@@ -27,6 +27,7 @@
 #include "util.h"
 #include "util.h"
 
 
 #define ANTMINER_IO_SPEED 115200
 #define ANTMINER_IO_SPEED 115200
+// ANTMINER_HASH_TIME is for U1/U2 only
 #define ANTMINER_HASH_TIME 0.0000000004761
 #define ANTMINER_HASH_TIME 0.0000000004761
 
 
 #define ANTMINER_STATUS_LEN 5
 #define ANTMINER_STATUS_LEN 5
@@ -52,8 +53,10 @@ bool antminer_detect_one(const char *devpath)
 	*info = (struct ICARUS_INFO){
 	*info = (struct ICARUS_INFO){
 		.baud = ANTMINER_IO_SPEED,
 		.baud = ANTMINER_IO_SPEED,
 		.Hs = ANTMINER_HASH_TIME,
 		.Hs = ANTMINER_HASH_TIME,
-		.timing_mode = MODE_DEFAULT,
+		.timing_mode = MODE_LONG,
+		.do_icarus_timing = true,
 		.read_size = 5,
 		.read_size = 5,
+		.reopen_mode = IRM_NEVER,
 	};
 	};
 	
 	
 	struct cgpu_info * const dev = icarus_detect_custom(devpath, drv, info);
 	struct cgpu_info * const dev = icarus_detect_custom(devpath, drv, info);
@@ -64,7 +67,7 @@ bool antminer_detect_one(const char *devpath)
 	}
 	}
 	
 	
 	dev->set_device_funcs = antminer_set_device_funcs;
 	dev->set_device_funcs = antminer_set_device_funcs;
-	info->read_timeout_ms = 1500;
+	info->read_timeout_ms = 75;
 	
 	
 	return true;
 	return true;
 }
 }