From owner-svn-src-stable-12@freebsd.org Sun Dec 22 18:55:10 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 487E21D9EBD; Sun, 22 Dec 2019 18:55:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47gs9p1DPDz3Ckg; Sun, 22 Dec 2019 18:55:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 254CC3ED7; Sun, 22 Dec 2019 18:55:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBMItAZ9017229; Sun, 22 Dec 2019 18:55:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBMIt9hV017227; Sun, 22 Dec 2019 18:55:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201912221855.xBMIt9hV017227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Dec 2019 18:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356019 - in stable/12: share/man/man4 sys/dev/usb/serial X-SVN-Group: stable-12 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/usb/serial X-SVN-Commit-Revision: 356019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2019 18:55:10 -0000 Author: ian Date: Sun Dec 22 18:55:09 2019 New Revision: 356019 URL: https://svnweb.freebsd.org/changeset/base/356019 Log: MFC r355572: Allow baud rates of 1,228,800 and 1,843,200 on CP2101/2/3 usb-serial adapters. The datasheets for these chips claim the maximum is 921,600, but testing shows these two higher rates also work (but no rates above 921,600 other than these two work; these represent dividing the base buad clock by 3 and 2 respectively). Modified: stable/12/share/man/man4/uslcom.4 stable/12/sys/dev/usb/serial/uslcom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/uslcom.4 ============================================================================== --- stable/12/share/man/man4/uslcom.4 Sun Dec 22 18:51:05 2019 (r356018) +++ stable/12/share/man/man4/uslcom.4 Sun Dec 22 18:55:09 2019 (r356019) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd December 9, 2019 .Dt USLCOM 4 .Os .Sh NAME @@ -43,6 +43,11 @@ The .Nm driver supports Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105 based USB serial adapters. +.Pp +The datasheets for the CP2101/CP2102/CP2103 list the maximum +supported baud rate as 921,600. +Empirical testing has shown that the rates 1,228,800 and 1,843,200 also work, +at least on some hardware, so the driver allows setting those rates. .Sh HARDWARE The following devices should work with the .Nm Modified: stable/12/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/12/sys/dev/usb/serial/uslcom.c Sun Dec 22 18:51:05 2019 (r356018) +++ stable/12/sys/dev/usb/serial/uslcom.c Sun Dec 22 18:55:09 2019 (r356019) @@ -624,7 +624,11 @@ uslcom_pre_param(struct ucom_softc *ucom, struct termi case USLCOM_PARTNUM_CP2102: case USLCOM_PARTNUM_CP2103: default: - maxspeed = 921600; + /* + * Datasheet for cp2102 says 921600 max. Testing shows that + * 1228800 and 1843200 work fine. + */ + maxspeed = 1843200; break; } if (t->c_ospeed <= 0 || t->c_ospeed > maxspeed)