Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144540213
D39770.1775303516.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39770.1775303516.diff
View Options
diff --git a/sys/dev/usb/serial/uchcom.c b/sys/dev/usb/serial/uchcom.c
--- a/sys/dev/usb/serial/uchcom.c
+++ b/sys/dev/usb/serial/uchcom.c
@@ -155,6 +155,14 @@
#define UCHCOM_BULK_BUF_SIZE 1024 /* bytes */
+/*
+ * As speeds for uchcom devices increase, these numbers will need to
+ * be increased. This needs to be tested.
+ *
+ * TODO: The TTY buffers should be increased!
+ */
+#define UCHCOM_BUF_SIZE 1024
+
enum {
UCHCOM_BULK_DT_WR,
UCHCOM_BULK_DT_RD,
@@ -242,6 +250,28 @@
static usb_callback_t uchcom_read_callback;
static const struct usb_config uchcom_config_data[UCHCOM_N_TRANSFER] = {
+ [UCHCOM_BULK_WR] = {
+ .type = UE_BULK,
+ .endpoint = UE_ADDR_ANY,
+ .direction = UE_DIR_TX,
+ .if_index = 0,
+ .bufsize = UCHCOM_BUF_SIZE,
+ .flags = {.pipe_bof = 1,.force_short_xfer = 1,},
+ .callback = &uchcom_write_callback,
+ .usb_mode = USB_MODE_DUAL,
+ },
+
+ [UCHCOM_BULK_RD] = {
+ .type = UE_BULK,
+ .endpoint = UE_ADDR_ANY,
+ .direction = UE_DIR_RX,
+ .if_index = 0,
+ .bufsize = UCHCOM_BUF_SIZE,
+ .flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
+ .callback = &uchcom_read_callback,
+ .usb_mode = USB_MODE_DUAL,
+ },
+
[UCHCOM_BULK_DT_WR] = {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
@@ -673,6 +703,12 @@
uchcom_cfg_open(struct ucom_softc *ucom)
{
struct uchcom_softc *sc = ucom->sc_parent;
+
+ /* clear stall */
+ if ((sc->sc_super_ucom.sc_flag & UCOM_FLAG_DEVICE_MODE) == 0) {
+ usbd_xfer_set_stall(sc->sc_xfer[UCHCOM_BULK_WR]);
+ usbd_xfer_set_stall(sc->sc_xfer[UCHCOM_BULK_RD]);
+ }
DPRINTF("\n");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 11:51 AM (1 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28259100
Default Alt Text
D39770.1775303516.diff (1 KB)
Attached To
Mode
D39770: uchcom: Try to fix upload to esp8266
Attached
Detach File
Event Timeline
Log In to Comment