Date: Sun, 28 Aug 2016 04:40:27 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304940 - head/sys/dev/uart Message-ID: <201608280440.u7S4eRAF000186@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608280440.u7S4eRAF000186>