Module Name: src Committed By: andvar Date: Sat Sep 16 18:56:40 UTC 2023
Modified Files: src/sys/arch/sh3/dev: sci.c Log Message: sh3/sci(4): replace undefined scistatus with DPRINTF. Fixes the build with SCI_DEBUG enabled. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sh3/dev/sci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sh3/dev/sci.c diff -u src/sys/arch/sh3/dev/sci.c:1.63 src/sys/arch/sh3/dev/sci.c:1.64 --- src/sys/arch/sh3/dev/sci.c:1.63 Sat Nov 21 17:25:52 2020 +++ src/sys/arch/sh3/dev/sci.c Sat Sep 16 18:56:39 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $ */ +/* $NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $ */ /*- * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $"); #include "opt_kgdb.h" #include "opt_sci.h" @@ -119,6 +119,13 @@ __KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.63 #include <sh3/tmureg.h> #include <sh3/exception.h> +#ifdef SCI_DEBUG +int sci_debug = 1; +#define DPRINTF(x) if (sci_debug) printf x +#else +#define DPRINTF(x) +#endif + static void scistart(struct tty *); static int sciparam(struct tty *, struct termios *); @@ -573,10 +580,7 @@ sciparam(struct tty *tp, struct termios splx(s); -#ifdef SCI_DEBUG - if (sci_debug) - scistatus(sc, "sciparam "); -#endif + DPRINTF(("%s: sciparam\n", device_xname(sc->sc_dev))); if (!ISSET(t->c_cflag, CHWFLOW)) { if (sc->sc_tx_stopped) { @@ -692,10 +696,7 @@ sciopen(dev_t dev, int flag, int mode, s sci_hwiflow(sc); #endif -#ifdef SCI_DEBUG - if (sci_debug) - scistatus(sc, "sciopen "); -#endif + DPRINTF(("%s: sciopen\n", device_xname(sc->sc_dev))); splx(s2); } @@ -1025,10 +1026,7 @@ sci_stsoft(struct sci_softc *sc, struct } } -#ifdef SCI_DEBUG - if (sci_debug) - scistatus(sc, "sci_stsoft"); -#endif + DPRINTF(("%s: sci_stsoft\n", device_xname(sc->sc_dev))); #endif } @@ -1217,10 +1215,8 @@ sciintr(void *arg) if (ISSET(~msr, sc->sc_msr_mask)) { sc->sc_tbc = 0; sc->sc_heldtbc = 0; -#ifdef SCI_DEBUG - if (sci_debug) - scistatus(sc, "sciintr "); -#endif + + DPRINTF(("%s: sciintr\n", device_xname(sc->sc_dev))); } sc->sc_st_check = 1;