From owner-svn-src-head@freebsd.org Sun Aug 28 04:40:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B22FA94A28; Sun, 28 Aug 2016 04:40:28 +0000 (UTC) (envelope-from jhibbits@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 mx1.freebsd.org (Postfix) with ESMTPS id 0DD7DD02; Sun, 28 Aug 2016 04:40:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7S4eRMB000187; Sun, 28 Aug 2016 04:40:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7S4eRAF000186; Sun, 28 Aug 2016 04:40:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201608280440.u7S4eRAF000186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 28 Aug 2016 04:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304940 - 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.22 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: Sun, 28 Aug 2016 04:40:28 -0000 Author: jhibbits Date: Sun Aug 28 04:40:27 2016 New Revision: 304940 URL: https://svnweb.freebsd.org/changeset/base/304940 Log: Fix UART PPS capture mode printing * Add breaks to prevent fallthrough and printing of multiple modes. * Only check the mode, mask out all other bits. Modified: head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sun Aug 28 04:15:20 2016 (r304939) +++ head/sys/dev/uart/uart_core.c Sun Aug 28 04:40:27 2016 (r304940) @@ -97,15 +97,19 @@ uart_pps_print_mode(struct uart_softc *s { device_printf(sc->sc_dev, "PPS capture mode: "); - switch(sc->sc_pps_mode) { + switch(sc->sc_pps_mode & UART_PPS_SIGNAL_MASK) { case UART_PPS_DISABLED: printf("disabled"); + break; case UART_PPS_CTS: printf("CTS"); + break; case UART_PPS_DCD: printf("DCD"); + break; default: printf("invalid"); + break; } if (sc->sc_pps_mode & UART_PPS_INVERT_PULSE) printf("-Inverted");