mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-25 17:54:39 +02:00
cgminer: disable auto detect since Icarus use default PL2303 configuration
This commit is contained in:
parent
622aa44c2c
commit
d3ed7805ff
@ -0,0 +1,72 @@
|
||||
From 46143d76539752dc929da18fed74301008c75184 Mon Sep 17 00:00:00 2001
|
||||
From: Xiangfu <xiangfu@openmobilefree.net>
|
||||
Date: Fri, 17 Feb 2012 11:19:44 +0800
|
||||
Subject: [PATCH] remove icarus detect auto. Icarus should configure the
|
||||
pl2303 eeprom for this
|
||||
|
||||
---
|
||||
cgminer.c | 2 +-
|
||||
icarus.c | 27 ---------------------------
|
||||
2 files changed, 1 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/cgminer.c b/cgminer.c
|
||||
index bfb8399..c97f276 100644
|
||||
--- a/cgminer.c
|
||||
+++ b/cgminer.c
|
||||
@@ -777,7 +777,7 @@ static struct opt_table opt_config_table[] = {
|
||||
OPT_WITHOUT_ARG("--round-robin",
|
||||
set_rr, &pool_strategy,
|
||||
"Change multipool strategy from failover to round robin on failure"),
|
||||
-#if defined(USE_BITFORCE) || (defined(USE_ICARUS) && defined(WIN32))
|
||||
+#if defined(USE_BITFORCE) || defined(USE_ICARUS)
|
||||
OPT_WITH_ARG("--scan-serial|-S",
|
||||
add_serial, NULL, NULL,
|
||||
"Serial port to probe for FPGA Mining device"),
|
||||
diff --git a/icarus.c b/icarus.c
|
||||
index 141d639..1f8ab52 100644
|
||||
--- a/icarus.c
|
||||
+++ b/icarus.c
|
||||
@@ -157,31 +157,6 @@ static bool icarus_detect_one(const char *devpath)
|
||||
return true;
|
||||
}
|
||||
|
||||
-static void icarus_detect_auto()
|
||||
-{
|
||||
-#ifndef WIN32
|
||||
- DIR *D;
|
||||
- struct dirent *de;
|
||||
- const char udevdir[] = "/dev/serial/by-id";
|
||||
- char devpath[sizeof(udevdir) + 1 + NAME_MAX];
|
||||
- char *devfile = devpath + sizeof(udevdir);
|
||||
-
|
||||
- D = opendir(udevdir);
|
||||
- if (!D)
|
||||
- return;
|
||||
- memcpy(devpath, udevdir, sizeof(udevdir) - 1);
|
||||
- devpath[sizeof(udevdir) - 1] = '/';
|
||||
- while ( (de = readdir(D)) ) {
|
||||
- /* Icarus using a PL2303 usb-serial chip */
|
||||
- if (!strstr(de->d_name, "Prolific_Technology_Inc"))
|
||||
- continue;
|
||||
- strcpy(devfile, de->d_name);
|
||||
- icarus_detect_one(devpath);
|
||||
- }
|
||||
- closedir(D);
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
static void icarus_detect()
|
||||
{
|
||||
struct string_elist *iter, *tmp;
|
||||
@@ -190,8 +165,6 @@ static void icarus_detect()
|
||||
if (icarus_detect_one(iter->string))
|
||||
string_elist_del(iter);
|
||||
}
|
||||
-
|
||||
- icarus_detect_auto();
|
||||
}
|
||||
|
||||
static pthread_mutex_t hash_lock;
|
||||
--
|
||||
1.7.5.4
|
||||
|
Loading…
Reference in New Issue
Block a user