aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/serial
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2018-05-21 20:59:15 +0000
committerAndriy Gapon <avg@FreeBSD.org>2018-05-21 20:59:15 +0000
commit7acd73fd1e23c9488ebd9bd5c42af3bf53d17576 (patch)
treecdee53124b62ee9a66c2d834598d2f6af4e7b0a6 /sys/dev/usb/serial
parent1d33c9a55f9107e7be89579d577d1d89b200a058 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/serial')
-rw-r--r--sys/dev/usb/serial/uchcom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/serial/uchcom.c b/sys/dev/usb/serial/uchcom.c
index 30084c448b4a..f8c6b52829bd 100644
--- a/sys/dev/usb/serial/uchcom.c
+++ b/sys/dev/usb/serial/uchcom.c
@@ -618,8 +618,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t rate)
if (uchcom_calc_divider_settings(&dv, rate))
return;
+ /*
+ * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE,
+ * otherwise the chip will buffer data.
+ */
uchcom_write_reg(sc,
- UCHCOM_REG_BPS_PRE, dv.dv_prescaler,
+ UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80,
UCHCOM_REG_BPS_DIV, dv.dv_div);
uchcom_write_reg(sc,
UCHCOM_REG_BPS_MOD, dv.dv_mod,