Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 08:50:46 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r335621 - stable/10/sys/dev/usb/serial
Message-ID:  <201806250850.w5P8okBX043609@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Jun 25 08:50:46 2018
New Revision: 335621
URL: https://svnweb.freebsd.org/changeset/base/335621

Log:
  MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==============================================================================
--- stable/10/sys/dev/usb/serial/uchcom.c	Mon Jun 25 08:50:06 2018	(r335620)
+++ stable/10/sys/dev/usb/serial/uchcom.c	Mon Jun 25 08:50:46 2018	(r335621)
@@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t 
 	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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806250850.w5P8okBX043609>