From owner-svn-src-head@FreeBSD.ORG Sat Mar 8 03:39:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DF7692; Sat, 8 Mar 2014 03:39:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E918B1AF; Sat, 8 Mar 2014 03:39:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s283dFRw010156; Sat, 8 Mar 2014 03:39:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s283dFFq010153; Sat, 8 Mar 2014 03:39:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201403080339.s283dFFq010153@svn.freebsd.org> From: Warner Losh Date: Sat, 8 Mar 2014 03:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262921 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 03:39:16 -0000 Author: imp Date: Sat Mar 8 03:39:15 2014 New Revision: 262921 URL: http://svnweb.freebsd.org/changeset/base/262921 Log: Set the baud rate if it isn't 0 (meaning it has been specified) not only if it is 0 (meaning that it hasn't been specified and is likely to turn off the UART's transmitter). Modified: head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sat Mar 8 03:39:09 2014 (r262920) +++ head/sys/dev/uart/uart_core.c Sat Mar 8 03:39:15 2014 (r262921) @@ -473,7 +473,7 @@ uart_bus_attach(device_t dev) } if (sc->sc_sysdev != NULL) { - if (sc->sc_sysdev->baudrate == 0) { + if (sc->sc_sysdev->baudrate != 0) { if (UART_IOCTL(sc, UART_IOCTL_BAUD, (intptr_t)&sc->sc_sysdev->baudrate) != 0) sc->sc_sysdev->baudrate = -1;