diff options
author | drochner <drochner@pkgsrc.org> | 2010-08-03 15:22:27 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2010-08-03 15:22:27 +0000 |
commit | 5aa0b514eaa420133048f3b4bdfcebbfffb20099 (patch) | |
tree | ddff34dfc88721af079b0f8cba24778a43c5a2d6 /misc | |
parent | 419c93b85f9f09375262bee39271ecd997058793 (diff) | |
download | pkgsrc-5aa0b514eaa420133048f3b4bdfcebbfffb20099.tar.gz |
fix a bug in optimizer code which is used by some cable drivers to
reduce the number of transactions which resulted in a wrong TDO
picked up under some circumstances
being here, quell a warning in the usbprog driver which only tells
us what we already know, and improve an error message
bump PKGREVISION
Diffstat (limited to 'misc')
-rw-r--r-- | misc/urjtag/Makefile | 3 | ||||
-rw-r--r-- | misc/urjtag/distinfo | 3 | ||||
-rw-r--r-- | misc/urjtag/files/usbprog.c | 9 | ||||
-rw-r--r-- | misc/urjtag/patches/patch-ae | 32 |
4 files changed, 42 insertions, 5 deletions
diff --git a/misc/urjtag/Makefile b/misc/urjtag/Makefile index c1942b2956c..b3920b12c16 100644 --- a/misc/urjtag/Makefile +++ b/misc/urjtag/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2010/07/30 16:59:48 drochner Exp $ +# $NetBSD: Makefile,v 1.3 2010/08/03 15:22:27 drochner Exp $ # DISTNAME= urjtag-0.10 +PKGREVISION= 1 CATEGORIES= misc MASTER_SITES= http://downloads.sourceforge.net/project/urjtag/urjtag/0.10/ diff --git a/misc/urjtag/distinfo b/misc/urjtag/distinfo index 83bbc740a8f..25c4fe07f90 100644 --- a/misc/urjtag/distinfo +++ b/misc/urjtag/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2010/07/30 16:59:48 drochner Exp $ +$NetBSD: distinfo,v 1.3 2010/08/03 15:22:27 drochner Exp $ SHA1 (urjtag-0.10.tar.gz) = 1e21f07d758e9e151d932e95c0b3b11fd178eace RMD160 (urjtag-0.10.tar.gz) = d22dcaf8447e594f5fbb25836df141e2a451760a @@ -7,3 +7,4 @@ SHA1 (patch-aa) = 0c5128a37f763eb5f436f7682cbb1172f1c8fe40 SHA1 (patch-ab) = 1187447787012901d59f8967ae08c1047e23f38e SHA1 (patch-ac) = 1d241fb503e45a57f63f87eeada6804dbb278502 SHA1 (patch-ad) = 3dcf6a0297b339db1b52a8d9cb6fe907e589b07b +SHA1 (patch-ae) = 791cf819bad265d11c7ecd72cd89784f67428a20 diff --git a/misc/urjtag/files/usbprog.c b/misc/urjtag/files/usbprog.c index f28aad5734c..ab22a73bd79 100644 --- a/misc/urjtag/files/usbprog.c +++ b/misc/urjtag/files/usbprog.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbprog.c,v 1.1.1.1 2010/07/30 16:02:45 drochner Exp $ */ +/* $NetBSD: usbprog.c,v 1.2 2010/08/03 15:22:27 drochner Exp $ */ /* Written by Matthias Drochner. Public domain. */ @@ -120,7 +120,10 @@ static int usbprog_set_signal(cable_t *cable, int mask, int val) { - fprintf(stderr, "usbprog_set_signal called(%x, %x)\n", mask, val); + /* /TRST isn't supported yet */ + if (mask & ~CS_TRST) + fprintf(stderr, "usbprog_set_signal called(%x, %x)\n", + mask, val); return 1; } @@ -150,7 +153,7 @@ usbprog_transfer(cable_t *cable, int len, char *in, char *out ) fprintf(stderr, "usbprog_transfer: write error\n"); res = usb_bulk_read(h, 2, ans, 64, 500); if (res != 64) - fprintf(stderr, "usbprog_transfer: read %d\n", res); + fprintf(stderr, "usbprog_transfer(%d): read %d\n", len, res); if (!out) return len; for (i = 0; i < len; i++) diff --git a/misc/urjtag/patches/patch-ae b/misc/urjtag/patches/patch-ae new file mode 100644 index 00000000000..2a8e9bbe1d5 --- /dev/null +++ b/misc/urjtag/patches/patch-ae @@ -0,0 +1,32 @@ +$NetBSD: patch-ae,v 1.1 2010/08/03 15:22:27 drochner Exp $ + +--- src/tap/cable/generic.c.orig 2009-04-17 20:24:10.000000000 +0000 ++++ src/tap/cable/generic.c +@@ -202,7 +202,7 @@ generic_flush_using_transfer( cable_t *c + + do + { +- int r, bits = 0, tdo = 0; ++ int r, bits = 0, tdo = 0, savbits; + + #ifdef VERBOSE + printf("flush(%d)\n", cable->todo.num_items); +@@ -254,6 +254,7 @@ generic_flush_using_transfer( cable_t *c + #ifdef VERBOSE + printf("%d combined into one (%d bits)\n", n, bits); + #endif ++ savbits = bits; + + if(bits == 0 || n <= 1) + { +@@ -320,6 +321,10 @@ generic_flush_using_transfer( cable_t *c + printf("add result from transfer to %p.%d\n", &(cable->done), c); + #endif + cable->done.data[c].action = CABLE_GET_TDO; ++ if (bits < savbits) ++ tdo = out[bits]; ++ else ++ tdo = cable->driver->get_tdo(cable); + cable->done.data[c].arg.value.val = tdo; + } + else if(cable->todo.data[i].action == CABLE_TRANSFER) |