[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [OpenOCD-devel] [PATCH]: 942d5b5 stlink: use proper endpoint for mode leave as per specification
From: gerrit () openocd ! org (gerrit)
Date: 2020-02-14 22:54:31
Message-ID: 20200214225431.510284A0047 () mail ! openocd ! org
[Download RAW message or body]
This is an automated email from Gerrit.
Tarek BOCHKATI (tarek.bouchkati@gmail.com) just uploaded a new patch set to Gerrit, \
which you can find at http://openocd.zylin.com/5455
-- gerrit
commit 942d5b52acb31b25c4b33660911639bcf6502028
Author: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Date: Fri Feb 14 23:53:14 2020 +0100
stlink: use proper endpoint for mode leave as per specification
this is not an issue for direct USB communication
but this is mandatory for stlink-server support over TCP
Change-Id: I003ad364e03d3a10bc036772db86310d996cbe81
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index dc2fe8c..fef7aa1 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -53,7 +53,6 @@
#define STLINK_WRITE_TIMEOUT 1000
#define STLINK_READ_TIMEOUT 1000
-#define STLINK_NULL_EP 0
#define STLINK_RX_EP (1|ENDPOINT_IN)
#define STLINK_TX_EP (2|ENDPOINT_OUT)
#define STLINK_TRACE_EP (3|ENDPOINT_IN)
@@ -1250,7 +1249,7 @@ static int stlink_usb_mode_leave(void *handle, enum stlink_mode \
type)
assert(handle != NULL);
- stlink_usb_init_buffer(handle, STLINK_NULL_EP, 0);
+ stlink_usb_init_buffer(handle, h->rx_ep, 0);
switch (type) {
case STLINK_MODE_DEBUG_JTAG:
@@ -1271,7 +1270,7 @@ static int stlink_usb_mode_leave(void *handle, enum stlink_mode \
type) return ERROR_FAIL;
}
- res = stlink_usb_xfer_noerrcheck(handle, 0, 0);
+ res = stlink_usb_xfer_noerrcheck(handle, h->databuf, 0);
if (res != ERROR_OK)
return res;
--
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic