Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Don't accumulate RX data into packets on CH341.



details:   https://anonhg.NetBSD.org/src/rev/25352780b496
branches:  trunk
changeset: 446540:25352780b496
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Dec 10 00:22:13 2018 +0000

description:
Don't accumulate RX data into packets on CH341.

diffstat:

 sys/dev/usb/uchcom.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 71e32b2d3251 -r 25352780b496 sys/dev/usb/uchcom.c
--- a/sys/dev/usb/uchcom.c      Mon Dec 10 00:03:11 2018 +0000
+++ b/sys/dev/usb/uchcom.c      Mon Dec 10 00:22:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $     */
+/*     $NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $     */
 
 /*
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.18 2018/12/10 00:03:11 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.19 2018/12/10 00:22:13 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -98,6 +98,9 @@
 #define UCHCOM_VER_30          0x30
 
 #define UCHCOM_BASE_UNKNOWN    0
+
+#define UCHCOM_BPS_PRE_IMM     0x80    /* CH341: immediate RX forwarding */
+
 #define UCHCOM_BPS_MOD_BASE    20000000
 #define UCHCOM_BPS_MOD_BASE_OFS        1100
 
@@ -706,7 +709,8 @@
                return EINVAL;
 
        if ((err = write_reg(sc,
-                            UCHCOM_REG_BPS_PRE, dv.dv_prescaler,
+                            UCHCOM_REG_BPS_PRE,
+                            dv.dv_prescaler | UCHCOM_BPS_PRE_IMM,
                             UCHCOM_REG_BPS_DIV, dv.dv_div)) ||
            (err = write_reg(sc,
                             UCHCOM_REG_BPS_MOD, dv.dv_mod,



Home | Main Index | Thread Index | Old Index