Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Use aprint_*().



details:   https://anonhg.NetBSD.org/src/rev/8a88ac5738f0
branches:  trunk
changeset: 542497:8a88ac5738f0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jan 31 00:26:25 2003 +0000

description:
Use aprint_*().

diffstat:

 sys/dev/ic/aac.c         |  52 ++++++++++++++++++++++++-------------------
 sys/dev/ic/ac97.c        |  47 +++++++++++++++++++-------------------
 sys/dev/ic/adv.c         |  39 ++++++++++++++++---------------
 sys/dev/ic/adw.c         |  27 +++++++++++----------
 sys/dev/ic/aic7xxx.c     |  58 +++++++++++++++++++++++++++--------------------
 sys/dev/ic/an.c          |  17 +++++++------
 sys/dev/ic/bha.c         |  34 +++++++++++++++------------
 sys/dev/ic/cac.c         |  20 ++++++++--------
 sys/dev/ic/com.c         |  22 +++++++++---------
 sys/dev/ic/cy.c          |   8 +++---
 sys/dev/ic/dpt.c         |  30 ++++++++++++------------
 sys/dev/ic/elink3.c      |  27 +++++++++++----------
 sys/dev/ic/elinkxl.c     |  48 +++++++++++++++++++++++----------------
 sys/dev/ic/esiop.c       |  14 +++++-----
 sys/dev/ic/gem.c         |  33 ++++++++++++++------------
 sys/dev/ic/i82365.c      |  16 ++++++------
 sys/dev/ic/i82557.c      |  39 +++++++++++++++++--------------
 sys/dev/ic/icp.c         |  46 +++++++++++++++++++++----------------
 sys/dev/ic/midway.c      |  31 ++++++++++++++----------
 sys/dev/ic/rrunner.c     |  26 ++++++++++++---------
 sys/dev/ic/siop_common.c |  13 +++++----
 sys/dev/ic/smc83c170.c   |  24 ++++++++++---------
 22 files changed, 363 insertions(+), 308 deletions(-)

diffs (truncated from 2397 to 300 lines):

diff -r 7891acc23d00 -r 8a88ac5738f0 sys/dev/ic/aac.c
--- a/sys/dev/ic/aac.c  Fri Jan 31 00:07:39 2003 +0000
+++ b/sys/dev/ic/aac.c  Fri Jan 31 00:26:25 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aac.c,v 1.7 2003/01/01 00:10:18 thorpej Exp $  */
+/*     $NetBSD: aac.c,v 1.8 2003/01/31 00:26:25 thorpej Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.7 2003/01/01 00:10:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.8 2003/01/31 00:26:25 thorpej Exp $");
 
 #include "locators.h"
 
@@ -184,7 +184,8 @@
        sc->sc_ccbs = malloc(sizeof(*ac) * AAC_NCCBS, M_DEVBUF,
            M_NOWAIT | M_ZERO);
        if (sc->sc_ccbs == NULL) {
-               printf("%s: memory allocation failure\n", sc->sc_dv.dv_xname);
+               aprint_error("%s: memory allocation failure\n",
+                   sc->sc_dv.dv_xname);
                return (ENOMEM);
        }
        state = 0;
@@ -192,28 +193,29 @@
 
        if ((rv = bus_dmamap_create(sc->sc_dmat, size, 1, size,
            0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &sc->sc_fibs_dmamap)) != 0) {
-               printf("%s: cannot create fibs dmamap\n",
+               aprint_error("%s: cannot create fibs dmamap\n",
                    sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
        if ((rv = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0,
            &sc->sc_fibs_seg, 1, &nsegs, BUS_DMA_NOWAIT)) != 0) {
-               printf("%s: can't allocate fibs structure\n",
+               aprint_error("%s: can't allocate fibs structure\n",
                    sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
        if ((rv = bus_dmamem_map(sc->sc_dmat, &sc->sc_fibs_seg, nsegs, size,
            (caddr_t *)&sc->sc_fibs, 0)) != 0) {
-               printf("%s: can't map fibs structure\n",
+               aprint_error("%s: can't map fibs structure\n",
                    sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
        if ((rv = bus_dmamap_load(sc->sc_dmat, sc->sc_fibs_dmamap, sc->sc_fibs,
            size, NULL, BUS_DMA_NOWAIT)) != 0) {
-               printf("%s: cannot load fibs dmamap\n", sc->sc_dv.dv_xname);
+               aprint_error("%s: cannot load fibs dmamap\n",
+                   sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
@@ -230,7 +232,7 @@
                        while (--ac >= sc->sc_ccbs)
                                bus_dmamap_destroy(sc->sc_dmat,
                                    ac->ac_dmamap_xfer);
-                       printf("%s: cannot create ccb dmamap (%d)",
+                       aprint_error("%s: cannot create ccb dmamap (%d)",
                            sc->sc_dv.dv_xname, rv);
                        goto bail_out;
                }
@@ -340,18 +342,19 @@
        arg = 0;
        if (aac_sync_fib(sc, RequestAdapterInfo, 0, &arg, sizeof(arg), &buf,
            &bufsize)) {
-               printf("%s: RequestAdapterInfo failed\n", sc->sc_dv.dv_xname);
+               aprint_error("%s: RequestAdapterInfo failed\n",
+                   sc->sc_dv.dv_xname);
                return;
        }
        if (bufsize != sizeof(*info)) {
-               printf("%s: "
+               aprint_error("%s: "
                    "RequestAdapterInfo returned wrong data size (%d != %d)\n",
                    sc->sc_dv.dv_xname, bufsize, sizeof(*info));
                return;
        }
        info = (struct aac_adapter_info *)&buf[0];
 
-       printf("%s: %s at %dMHz, %dMB cache, %s, kernel %d.%d-%d\n",
+       aprint_normal("%s: %s at %dMHz, %dMB cache, %s, kernel %d.%d-%d\n",
            sc->sc_dv.dv_xname,
            aac_describe_code(aac_cpu_variant, le32toh(info->CpuVariant)),
            le32toh(info->ClockSpeed),
@@ -378,7 +381,7 @@
        if ((sc->sc_quirks & AAC_QUIRK_PERC2QC) != 0) {
                if (aac_sync_command(sc, AAC_MONKER_GETKERNVER, 0, 0, 0, 0,
                    NULL)) {
-                       printf("%s: error reading firmware version\n",
+                       aprint_error("%s: error reading firmware version\n",
                            sc->sc_dv.dv_xname);
                        return (1);
                }
@@ -387,7 +390,8 @@
                major = (AAC_GETREG4(sc, AAC_SA_MAILBOX + 4) & 0xff) - 0x30;
                minor = (AAC_GETREG4(sc, AAC_SA_MAILBOX + 8) & 0xff) - 0x30;
                if (major == 1) {
-                       printf("%s: firmware version %d.%d not supported.\n",
+                       aprint_error(
+                           "%s: firmware version %d.%d not supported.\n",
                            sc->sc_dv.dv_xname, major, minor);
                        return (1);
                }
@@ -412,12 +416,12 @@
        for (i = 0; i < AAC_BOOT_TIMEOUT * 1000; i++) {
                code = AAC_GET_FWSTATUS(sc);
                if ((code & AAC_SELF_TEST_FAILED) != 0) {
-                       printf("%s: FATAL: selftest failed\n",
+                       aprint_error("%s: FATAL: selftest failed\n",
                            sc->sc_dv.dv_xname);
                        return (ENXIO);
                }
                if ((code & AAC_KERNEL_PANIC) != 0) {
-                       printf("%s: FATAL: controller kernel panic\n",
+                       aprint_error("%s: FATAL: controller kernel panic\n",
                            sc->sc_dv.dv_xname);
                        return (ENXIO);
                }
@@ -426,7 +430,8 @@
                DELAY(1000);
        }
        if (i == AAC_BOOT_TIMEOUT * 1000) {
-               printf("%s: FATAL: controller not coming ready, status %x\n",
+               aprint_error(
+                   "%s: FATAL: controller not coming ready, status %x\n",
                    sc->sc_dv.dv_xname, code);
                return (ENXIO);
        }
@@ -434,21 +439,21 @@
        if ((rv = bus_dmamap_create(sc->sc_dmat, sizeof(*sc->sc_common), 1,
            sizeof(*sc->sc_common), 0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW,
            &sc->sc_common_dmamap)) != 0) {
-               printf("%s: cannot create common dmamap\n",
+               aprint_error("%s: cannot create common dmamap\n",
                    sc->sc_dv.dv_xname);
                return (rv);
        }
        if ((rv = bus_dmamem_alloc(sc->sc_dmat, sizeof(*sc->sc_common),
            PAGE_SIZE, 0, &sc->sc_common_seg, 1, &nsegs,
            BUS_DMA_NOWAIT)) != 0) {
-               printf("%s: can't allocate common structure\n",
+               aprint_error("%s: can't allocate common structure\n",
                    sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
        if ((rv = bus_dmamem_map(sc->sc_dmat, &sc->sc_common_seg, nsegs,
            sizeof(*sc->sc_common), (caddr_t *)&sc->sc_common, 0)) != 0) {
-               printf("%s: can't map common structure\n",
+               aprint_error("%s: can't map common structure\n",
                    sc->sc_dv.dv_xname);
                goto bail_out;
        }
@@ -456,7 +461,8 @@
        if ((rv = bus_dmamap_load(sc->sc_dmat, sc->sc_common_dmamap,
            sc->sc_common, sizeof(*sc->sc_common), NULL,
            BUS_DMA_NOWAIT)) != 0) {
-               printf("%s: cannot load common dmamap\n", sc->sc_dv.dv_xname);
+               aprint_error("%s: cannot load common dmamap\n",
+                   sc->sc_dv.dv_xname);
                goto bail_out;
        }
        state++;
@@ -589,7 +595,7 @@
        if (aac_sync_command(sc, AAC_MONKER_INITSTRUCT, 
            sc->sc_common_seg.ds_addr + offsetof(struct aac_common, ac_init),
            0, 0, 0, NULL)) {
-               printf("%s: error establishing init structure\n",
+               aprint_error("%s: error establishing init structure\n",
                    sc->sc_dv.dv_xname);
                rv = EIO;
                goto bail_out;
@@ -636,12 +642,12 @@
                mi.MntCount = htole32(i);
                if (aac_sync_fib(sc, ContainerCommand, 0, &mi, sizeof(mi), &mir,
                    &rsize)) {
-                       printf("%s: error probing container %d\n",
+                       aprint_error("%s: error probing container %d\n",
                            sc->sc_dv.dv_xname, i);
                        continue;
                }
                if (rsize != sizeof(mir)) {
-                       printf("%s: container info response wrong size "
+                       aprint_error("%s: container info response wrong size "
                            "(%d should be %d)\n",
                            sc->sc_dv.dv_xname, rsize, sizeof(mir));
                        continue;
diff -r 7891acc23d00 -r 8a88ac5738f0 sys/dev/ic/ac97.c
--- a/sys/dev/ic/ac97.c Fri Jan 31 00:07:39 2003 +0000
+++ b/sys/dev/ic/ac97.c Fri Jan 31 00:26:25 2003 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ac97.c,v 1.39 2003/01/20 07:22:15 simonb Exp $ */
+/*      $NetBSD: ac97.c,v 1.40 2003/01/31 00:26:26 thorpej Exp $ */
 /*     $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $       */
 
 /*
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.39 2003/01/20 07:22:15 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.40 2003/01/31 00:26:26 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -792,7 +792,7 @@
                        ouridx++;
                        break;
                default:
-                       printf ("ac97: shouldn't get here\n");
+                       aprint_error ("ac97: shouldn't get here\n");
                        break;
                }
        }
@@ -889,7 +889,7 @@
 
        id = (id1 << 16) | id2;
 
-       printf("%s: ", sc_dev->dv_xname);
+       aprint_normal("%s: ", sc_dev->dv_xname);
 
        for (i = 0; ; i++) {
                if (ac97codecid[i].id == 0) {
@@ -899,29 +899,29 @@
 #define ISASCII(c) ((c) >= ' ' && (c) < 0x7f)
                        if (ISASCII(pnp[0]) && ISASCII(pnp[1]) &&
                            ISASCII(pnp[2]))
-                               printf("%c%c%c%d", pnp[0], pnp[1], pnp[2],
-                                   pnp[3]);
+                               aprint_normal("%c%c%c%d",
+                                   pnp[0], pnp[1], pnp[2], pnp[3]);
                        else
-                               printf("unknown (0x%08x)", id);
+                               aprint_normal("unknown (0x%08x)", id);
                        break;
                }
                if (ac97codecid[i].id == (id & ac97codecid[i].mask)) {
-                       printf("%s", ac97codecid[i].name);
+                       aprint_normal("%s", ac97codecid[i].name);
                        if (ac97codecid[i].mask == AC97_VENDOR_ID_MASK) {
-                               printf(" (0x%08x)", id);
+                               aprint_normal(" (0x%08x)", id);
                        }
                        initfunc = ac97codecid[i].init;
                        break;
                }
        }
-       printf(" codec; ");
+       aprint_normal(" codec; ");
        for (i = j = 0; i < 10; i++) {
                if (as->caps & (1 << i)) {
-                       printf("%s%s", j? ", " : "", ac97feature[i]);
+                       aprint_normal("%s%s", j? ", " : "", ac97feature[i]);
                        j++;
                }
        }
-       printf("%s%s\n", j ? ", " : "",
+       aprint_normal("%s%s\n", j ? ", " : "",
               ac97enhancement[AC97_CAPS_ENHANCEMENT(as->caps)]);
 
        as->ac97_clock = AC97_STANDARD_CLOCK;
@@ -930,44 +930,44 @@
                          | AC97_EXT_AUDIO_SPDIF | AC97_EXT_AUDIO_VRM
                          | AC97_EXT_AUDIO_CDAC | AC97_EXT_AUDIO_SDAC
                          | AC97_EXT_AUDIO_LDAC)) {
-               printf("%s:", sc_dev->dv_xname);
+               aprint_normal("%s:", sc_dev->dv_xname);
                delim = "";
 
                ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &extstat);
                if (as->ext_id & AC97_EXT_AUDIO_VRA) {
-                       printf("%s variable rate audio", delim);
+                       aprint_normal("%s variable rate audio", delim);
                        delim = ",";
                        extstat |= AC97_EXT_AUDIO_VRA;
                }
                if (as->ext_id & AC97_EXT_AUDIO_DRA) {
-                       printf("%s double rate output", delim);
+                       aprint_normal("%s double rate output", delim);
                        delim = ",";
                }
                extstat &= ~AC97_EXT_AUDIO_DRA;
                if (as->ext_id & AC97_EXT_AUDIO_SPDIF) {
-                       printf("%s S/PDIF", delim);
+                       aprint_normal("%s S/PDIF", delim);
                        delim = ",";
                }
                if (as->ext_id & AC97_EXT_AUDIO_VRM) {
-                       printf("%s variable rate dedicated mic", delim);
+                       aprint_normal("%s variable rate dedicated mic", delim);



Home | Main Index | Thread Index | Old Index