diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 3346ae38..ef22c2bf 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2010-08-08 Arnim Laeuger + + * src/tap/cable/generic.c: fix TDO handling ingeneric_flush_using_transfer() + (Matthias Drochner) + 2010-08-07 Mike Frysinger * src/global/params.c (parse_param_lu): Accept unsigned values in hex format. diff --git a/urjtag/src/tap/cable/generic.c b/urjtag/src/tap/cable/generic.c index 47682c89..f3e9afca 100644 --- a/urjtag/src/tap/cable/generic.c +++ b/urjtag/src/tap/cable/generic.c @@ -208,7 +208,7 @@ urj_tap_cable_generic_flush_using_transfer (urj_cable_t *cable, do { - int r, bits = 0, tdo = 0; + int r, bits = 0, tdo = 0, savbits; urj_log (URJ_LOG_LEVEL_DETAIL, "flush(%d)\n", cable->todo.num_items); @@ -255,6 +255,8 @@ urj_tap_cable_generic_flush_using_transfer (urj_cable_t *cable, urj_log (URJ_LOG_LEVEL_DETAIL, "%d combined into one (%d bits)\n", n, bits); + savbits = bits; + if (bits == 0 || n <= 1) { do_one_queued_action (cable); @@ -333,6 +335,10 @@ urj_tap_cable_generic_flush_using_transfer (urj_cable_t *cable, "add result from transfer to %p.%d\n", &(cable->done), c); cable->done.data[c].action = URJ_TAP_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 == URJ_TAP_CABLE_TRANSFER)