Revert "mpsse: Always perform a general reset of the MPSSE in mpsse_open()"73/973/2
authorFreddie Chopin <freddie.chopin@gmail.com>
Fri, 9 Nov 2012 22:18:23 +0000 (9 23:18 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 12 Nov 2012 11:57:25 +0000 (12 11:57 +0000)
This reverts commit 452248af1d06cb1140b85f53ef4fdee1c746d807. This change
breaks all non-high speed adapters. The patch was not tested and did not get
any review.

Change-Id: Ib38fd242a202fd7c5a8711d9f857cd8f586df44e
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/973
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/drivers/mpsse.c

index 92f9331..d6cbc84 100644 (file)
@@ -55,7 +55,6 @@
 #define FTDI_DEVICE_OUT_REQTYPE (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE)
 #define FTDI_DEVICE_IN_REQTYPE (0x80 | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE)
 
-#define BITMODE_RESET 0x00
 #define BITMODE_MPSSE 0x02
 
 #define SIO_RESET_REQUEST             0x00
@@ -316,19 +315,6 @@ struct mpsse_ctx *mpsse_open(const uint16_t *vid, const uint16_t *pid, const cha
        err = libusb_control_transfer(ctx->usb_dev,
                        FTDI_DEVICE_OUT_REQTYPE,
                        SIO_SET_BITMODE_REQUEST,
-                       0x0b | (BITMODE_RESET << 8),
-                       ctx->index,
-                       NULL,
-                       0,
-                       ctx->usb_write_timeout);
-       if (err < 0) {
-               LOG_ERROR("unable to reset bitmode: %d", err);
-               goto error;
-       }
-
-       err = libusb_control_transfer(ctx->usb_dev,
-                       FTDI_DEVICE_OUT_REQTYPE,
-                       SIO_SET_BITMODE_REQUEST,
                        0x0b | (BITMODE_MPSSE << 8),
                        ctx->index,
                        NULL,