Date:2012-02-17 04:32:57 (9 years 8 days ago)
Author:Xiangfu Liu
Commit:d3ed7805ffe8050b877d7dba02e8eb16e9abbd45
Message:cgminer: disable auto detect since Icarus use default PL2303 configuration

Files: cgminer/patches/0007-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch (1 diff)
cgminer/patches/0007-remove-icarus-detect-auto.-Icarus-should-configure-t.patch (1 diff)
cgminer/patches/0008-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch (1 diff)

Change Details

cgminer/patches/0007-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch
1diff --git a/icarus.c b/icarus.c
2index 141d639..2e89a86 100644
3+++ b/icarus.c
4@@ -251,7 +251,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work, uint64_
5     work->blk.nonce = 0xffffffff;
6
7     memcpy((char *)&nonce, pdevbuf, sizeof(pdevbuf));
8-#ifndef __BIG_ENDIAN__
9+#if !defined (__BIG_ENDIAN__) && !defined(MIPSEB)
10     nonce = swab32(nonce);
11 #endif
12     submit_nonce(thr, work, nonce);
cgminer/patches/0007-remove-icarus-detect-auto.-Icarus-should-configure-t.patch
1From 46143d76539752dc929da18fed74301008c75184 Mon Sep 17 00:00:00 2001
2From: Xiangfu <xiangfu@openmobilefree.net>
3Date: Fri, 17 Feb 2012 11:19:44 +0800
4Subject: [PATCH] remove icarus detect auto. Icarus should configure the
5 pl2303 eeprom for this
6
7---
8 cgminer.c | 2 +-
9 icarus.c | 27 ---------------------------
10 2 files changed, 1 insertions(+), 28 deletions(-)
11
12diff --git a/cgminer.c b/cgminer.c
13index bfb8399..c97f276 100644
14--- a/cgminer.c
15@@ -777,7 +777,7 @@ static struct opt_table opt_config_table[] = {
16     OPT_WITHOUT_ARG("--round-robin",
17              set_rr, &pool_strategy,
18              "Change multipool strategy from failover to round robin on failure"),
19-#if defined(USE_BITFORCE) || (defined(USE_ICARUS) && defined(WIN32))
20+#if defined(USE_BITFORCE) || defined(USE_ICARUS)
21     OPT_WITH_ARG("--scan-serial|-S",
22              add_serial, NULL, NULL,
23              "Serial port to probe for FPGA Mining device"),
24diff --git a/icarus.c b/icarus.c
25index 141d639..1f8ab52 100644
26--- a/icarus.c
27@@ -157,31 +157,6 @@ static bool icarus_detect_one(const char *devpath)
28     return true;
29 }
30
31-static void icarus_detect_auto()
32-{
33-#ifndef WIN32
34- DIR *D;
35- struct dirent *de;
36- const char udevdir[] = "/dev/serial/by-id";
37- char devpath[sizeof(udevdir) + 1 + NAME_MAX];
38- char *devfile = devpath + sizeof(udevdir);
39-
40- D = opendir(udevdir);
41- if (!D)
42- return;
43- memcpy(devpath, udevdir, sizeof(udevdir) - 1);
44- devpath[sizeof(udevdir) - 1] = '/';
45- while ( (de = readdir(D)) ) {
46- /* Icarus using a PL2303 usb-serial chip */
47- if (!strstr(de->d_name, "Prolific_Technology_Inc"))
48- continue;
49- strcpy(devfile, de->d_name);
50- icarus_detect_one(devpath);
51- }
52- closedir(D);
53-#endif
54-}
55-
56 static void icarus_detect()
57 {
58     struct string_elist *iter, *tmp;
59@@ -190,8 +165,6 @@ static void icarus_detect()
60         if (icarus_detect_one(iter->string))
61             string_elist_del(iter);
62     }
63-
64- icarus_detect_auto();
65 }
66
67 static pthread_mutex_t hash_lock;
68--
691.7.5.4
70
cgminer/patches/0008-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch
1diff --git a/icarus.c b/icarus.c
2index 141d639..2e89a86 100644
3--- a/icarus.c
4@@ -251,7 +251,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work, uint64_
5     work->blk.nonce = 0xffffffff;
6
7     memcpy((char *)&nonce, pdevbuf, sizeof(pdevbuf));
8-#ifndef __BIG_ENDIAN__
9+#if !defined (__BIG_ENDIAN__) && !defined(MIPSEB)
10     nonce = swab32(nonce);
11 #endif
12     submit_nonce(thr, work, nonce);

Archive Download the corresponding diff file



interactive