diff --git a/jtag/ChangeLog b/jtag/ChangeLog index aac05684..be4279ee 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-02-09 Arnim Laeuger + + * src/tap/cable/ft2232.c (ft2232_transfer_schedule): ensure max number of bytes for + a single byte operation + * src/svf/svf.c (svf_sxr): avoid output capture in case TDO is not specified for SDR + 2008-02-07 Kolja Waschk * src/jtag.c, doc/jtag.1: Fix dropthrough to caller if -n was given diff --git a/jtag/src/svf/svf.c b/jtag/src/svf/svf.c index b4e0e44a..cf24915d 100644 --- a/jtag/src/svf/svf.c +++ b/jtag/src/svf/svf.c @@ -897,7 +897,10 @@ svf_sxr(enum generic_irdr_coding ir_dr, struct ths_params *params, YYLTYPE *loc) case generic_dr: svf_goto_state(Shift_DR); - chain_shift_data_registers_mode(chain, 1, 0, EXITMODE_EXIT1); + chain_shift_data_registers_mode(chain, + sxr_params->params.tdo ? 1 : 0, + 0, + EXITMODE_EXIT1); svf_goto_state(enddr); if (sxr_params->params.tdo) diff --git a/jtag/src/tap/cable/ft2232.c b/jtag/src/tap/cable/ft2232.c index df2ff5f5..f9a3f625 100644 --- a/jtag/src/tap/cable/ft2232.c +++ b/jtag/src/tap/cable/ft2232.c @@ -520,6 +520,10 @@ ft2232_transfer_schedule( cable_t *cable, int len, char *in, char *out ) /* reduce chunkbytes to the maximum amount we can receive in one step */ if (out && chunkbytes > params->maxrecv) chunkbytes = params->maxrecv; + /* restrict chunkbytes to the maximum amount that can be transferred + for one single operation */ + if (chunkbytes > (1 << 16)) + chunkbytes = 1 << 16; /*********************************************************************** * Step 1: @@ -792,8 +796,6 @@ ft2232_connect( char *params[], cable_t *cable ) if (strcasecmp( params[1], "ftdi-mpsse" ) == 0) { maxrecv = MAXRECV_FTDI; - puts( _("FT2232 driver based on libftdi selected.") ); - puts( _("Expect suboptimal performance for large shifts in comparison to libftd2xx.") ); } else if (strcasecmp( params[1], "ftd2xx-mpsse" ) == 0) { maxrecv = MAXRECV_FTD2XX; } else { @@ -860,13 +862,31 @@ static void ft2232_usbcable_help( const char *cablename ) { printf( _( +#ifdef HAVE_LIBFTDI "Usage: cable %s ftdi-mpsse VID:PID\n" +#endif +#ifdef HAVE_LIBFTD2XX "Usage: cable %s ftd2xx-mpsse VID:PID\n" +#endif "\n" "VID vendor ID (hex, e.g. 9FB, or empty)\n" "PID product ID (hex, e.g. 6001, or empty)\n" + "\n" +#ifdef HAVE_LIBFTDI + "Expect suboptimal performance of ftdi-mpsse for large shifts with output capture.\n" +#endif "\n" - ), cablename, cablename ); + ), +#ifdef HAVE_LIBFTDI + cablename +#endif +#if defined HAVE_LIBFTDI && defined HAVE_LIBFTD2XX + , +#endif +#ifdef HAVE_LIBFTD2XX + cablename +#endif + ); }