summaryrefslogtreecommitdiff
path: root/misc/urjtag/patches/patch-ae
diff options
context:
space:
mode:
Diffstat (limited to 'misc/urjtag/patches/patch-ae')
-rw-r--r--misc/urjtag/patches/patch-ae28
1 files changed, 25 insertions, 3 deletions
diff --git a/misc/urjtag/patches/patch-ae b/misc/urjtag/patches/patch-ae
index 2a8e9bbe1d5..429d1f1c0c5 100644
--- a/misc/urjtag/patches/patch-ae
+++ b/misc/urjtag/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.1 2010/08/03 15:22:27 drochner Exp $
+$NetBSD: patch-ae,v 1.2 2010/08/09 19:37:45 drochner Exp $
--- src/tap/cable/generic.c.orig 2009-04-17 20:24:10.000000000 +0000
+++ src/tap/cable/generic.c
@@ -7,7 +7,7 @@ $NetBSD: patch-ae,v 1.1 2010/08/03 15:22:27 drochner Exp $
do
{
- int r, bits = 0, tdo = 0;
-+ int r, bits = 0, tdo = 0, savbits;
++ int r, bits = 0, savbits;
#ifdef VERBOSE
printf("flush(%d)\n", cable->todo.num_items);
@@ -19,7 +19,21 @@ $NetBSD: patch-ae,v 1.1 2010/08/03 15:22:27 drochner Exp $
if(bits == 0 || n <= 1)
{
-@@ -320,6 +321,10 @@ generic_flush_using_transfer( cable_t *c
+@@ -309,17 +310,21 @@ generic_flush_using_transfer( cable_t *c
+ {
+ if(cable->todo.data[i].action == CABLE_CLOCK)
+ {
+- int k;
+- for(k=0;k<cable->todo.data[i].arg.clock.n;k++)
+- tdo = out[bits++];
++
++ bits += cable->todo.data[i].arg.clock.n;
+ }
+ else if(cable->todo.data[i].action == CABLE_GET_TDO)
+ {
++ int tdo;
+ int c = cable_add_queue_item( cable, &(cable->done) );
+ #ifdef VERBOSE
printf("add result from transfer to %p.%d\n", &(cable->done), c);
#endif
cable->done.data[c].action = CABLE_GET_TDO;
@@ -30,3 +44,11 @@ $NetBSD: patch-ae,v 1.1 2010/08/03 15:22:27 drochner Exp $
cable->done.data[c].arg.value.val = tdo;
}
else if(cable->todo.data[i].action == CABLE_TRANSFER)
+@@ -340,7 +345,6 @@ generic_flush_using_transfer( cable_t *c
+ if(len > 0) memcpy(p, out+bits, len);
+ }
+ if(len>0) bits += len;
+- if(bits>0) tdo = out[bits-1];
+ }
+ i++;
+ if(i >= cable->todo.max_items) i = 0;