Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/7891acc23d00
branches:  trunk
changeset: 542496:7891acc23d00
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jan 31 00:07:39 2003 +0000

description:
Use aprint_*().

diffstat:

 sys/dev/pci/aac_pci.c         |  26 ++++++++++--------
 sys/dev/pci/adv_pci.c         |  31 +++++++++++++---------
 sys/dev/pci/adw_pci.c         |  32 ++++++++++++++---------
 sys/dev/pci/agp.c             |   8 +++--
 sys/dev/pci/agp_ali.c         |  10 +++---
 sys/dev/pci/agp_amd.c         |  12 ++++----
 sys/dev/pci/agp_i810.c        |  21 ++++++++-------
 sys/dev/pci/agp_intel.c       |  10 +++---
 sys/dev/pci/agp_sis.c         |  10 +++---
 sys/dev/pci/agp_via.c         |  10 +++---
 sys/dev/pci/ahc_pci.c         |  36 ++++++++++++++-----------
 sys/dev/pci/amdpm.c           |  17 +++++++-----
 sys/dev/pci/amr.c             |  50 ++++++++++++++++++++-----------------
 sys/dev/pci/auich.c           |  33 ++++++++++++++---------
 sys/dev/pci/autri.c           |  22 +++++++++------
 sys/dev/pci/auvia.c           |  27 +++++++++++--------
 sys/dev/pci/bha_pci.c         |  21 ++++++++------
 sys/dev/pci/btvmei.c          |  25 ++++++++++--------
 sys/dev/pci/btvmeii.c         |  17 +++++++-----
 sys/dev/pci/cac_pci.c         |  19 ++++++++-----
 sys/dev/pci/cmpci.c           |  23 ++++++++++------
 sys/dev/pci/com_puc.c         |  16 ++++++-----
 sys/dev/pci/cs4280.c          |  27 +++++++++++--------
 sys/dev/pci/cs4281.c          |  27 +++++++++++--------
 sys/dev/pci/cy_pci.c          |  25 ++++++++++--------
 sys/dev/pci/cz.c              |  58 ++++++++++++++++++++++--------------------
 sys/dev/pci/dpt_pci.c         |  22 ++++++++-------
 sys/dev/pci/eap.c             |  23 +++++++++-------
 sys/dev/pci/ehci_pci.c        |  25 ++++++++++--------
 sys/dev/pci/emuxki.c          |  21 ++++++++------
 sys/dev/pci/esa.c             |  25 ++++++++++--------
 sys/dev/pci/esm.c             |  28 ++++++++++++--------
 sys/dev/pci/eso.c             |  49 +++++++++++++++++++++--------------
 sys/dev/pci/fms.c             |  23 +++++++++-------
 sys/dev/pci/fwlynx_pci.c      |  25 +++++++++++------
 sys/dev/pci/fwohci_pci.c      |  23 ++++++++++------
 sys/dev/pci/gtp.c             |  13 +++++---
 sys/dev/pci/hifn7751.c        |  52 ++++++++++++++++++++-----------------
 sys/dev/pci/i82365_pci.c      |  14 +++++----
 sys/dev/pci/icp_pci.c         |  38 ++++++++++++++-------------
 sys/dev/pci/if_an_pci.c       |  24 ++++++++++-------
 sys/dev/pci/if_en_pci.c       |  19 +++++++------
 sys/dev/pci/if_ep_pci.c       |  21 ++++++++------
 sys/dev/pci/if_epic_pci.c     |  27 +++++++++++--------
 sys/dev/pci/if_esh_pci.c      |  21 ++++++++------
 sys/dev/pci/if_ex_pci.c       |  29 ++++++++++++--------
 sys/dev/pci/if_fpa.c          |  22 ++++++++-------
 sys/dev/pci/if_fxp_pci.c      |  30 ++++++++++++---------
 sys/dev/pci/if_gem_pci.c      |  24 ++++++++++-------
 sys/dev/pci/siop_pci_common.c |  26 ++++++++++--------
 sys/dev/pci/universe_pci.c    |  20 +++++++-------
 51 files changed, 711 insertions(+), 546 deletions(-)

diffs (truncated from 4157 to 300 lines):

diff -r c563db203c28 -r 7891acc23d00 sys/dev/pci/aac_pci.c
--- a/sys/dev/pci/aac_pci.c     Thu Jan 30 23:43:33 2003 +0000
+++ b/sys/dev/pci/aac_pci.c     Fri Jan 31 00:07:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aac_pci.c,v 1.6 2002/10/02 16:50:59 thorpej Exp $      */
+/*     $NetBSD: aac_pci.c,v 1.7 2003/01/31 00:07:39 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.6 2002/10/02 16:50:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.7 2003/01/31 00:07:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -368,7 +368,8 @@
        sc = (struct aac_softc *)self;
        state = 0;
 
-       printf(": ");
+       aprint_naive(": RAID controller\n");
+       aprint_normal(": ");
 
        /*
         * Verify that the adapter is correctly set up in PCI space.
@@ -380,12 +381,12 @@
        AAC_DPRINTF(AAC_D_MISC, ("pci command status reg 0x08x "));
 
        if ((command & PCI_COMMAND_MASTER_ENABLE) == 0) {
-               printf("can't enable bus-master feature\n");
+               aprint_error("can't enable bus-master feature\n");
                goto bail_out;
        }
 
        if ((command & PCI_COMMAND_MEM_ENABLE) == 0) {
-               printf("memory window not available\n");
+               aprint_error("memory window not available\n");
                goto bail_out;
        }
 
@@ -395,22 +396,22 @@
        if (pci_mapreg_map(pa, PCI_MAPREG_START,
            PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_memt,
            &sc->sc_memh, &membase, &memsize)) {
-               printf("can't find mem space\n");
+               aprint_error("can't find mem space\n");
                goto bail_out;
        }
        state++;
 
        if (pci_intr_map(pa, &ih)) {
-               printf("couldn't map interrupt\n");
+               aprint_error("couldn't map interrupt\n");
                goto bail_out;
        }
        intrstr = pci_intr_string(pc, ih);
        sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, aac_intr, sc);
        if (sc->sc_ih == NULL) {
-               printf("couldn't establish interrupt");
+               aprint_error("couldn't establish interrupt");
                if (intrstr != NULL)
-                       printf(" at %s", intrstr);
-               printf("\n");
+                       aprint_normal(" at %s", intrstr);
+               aprint_normal("\n");
                goto bail_out;
        }
        state++;
@@ -418,9 +419,10 @@
        sc->sc_dmat = pa->pa_dmat;
 
        m = aac_find_ident(pa);
-       printf("%s\n", m->prodstr);
+       aprint_normal("%s\n", m->prodstr);
        if (intrstr != NULL)
-               printf("%s: interrupting at %s\n", sc->sc_dv.dv_xname, intrstr);
+               aprint_normal("%s: interrupting at %s\n",
+                   sc->sc_dv.dv_xname, intrstr);
 
        sc->sc_hwif = m->hwif;
        sc->sc_quirks = m->quirks;
diff -r c563db203c28 -r 7891acc23d00 sys/dev/pci/adv_pci.c
--- a/sys/dev/pci/adv_pci.c     Thu Jan 30 23:43:33 2003 +0000
+++ b/sys/dev/pci/adv_pci.c     Fri Jan 31 00:07:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv_pci.c,v 1.13 2002/10/02 16:50:59 thorpej Exp $     */
+/*     $NetBSD: adv_pci.c,v 1.14 2003/01/31 00:07:39 thorpej Exp $     */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adv_pci.c,v 1.13 2002/10/02 16:50:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adv_pci.c,v 1.14 2003/01/31 00:07:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -138,32 +138,35 @@
        u_int32_t       command;
        const char     *intrstr;
 
+       aprint_naive(": SCSI controller\n");
 
        sc->sc_flags = 0x0;
        if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ADVSYS)
                switch (PCI_PRODUCT(pa->pa_id)) {
                case PCI_PRODUCT_ADVSYS_1200A:
-                       printf(": AdvanSys ASC1200A SCSI adapter\n");
+                       aprint_normal(": AdvanSys ASC1200A SCSI adapter\n");
                        break;
 
                case PCI_PRODUCT_ADVSYS_1200B:
-                       printf(": AdvanSys ASC1200B SCSI adapter\n");
+                       aprint_normal(": AdvanSys ASC1200B SCSI adapter\n");
                        break;
 
                case PCI_PRODUCT_ADVSYS_ULTRA:
                        switch (PCI_REVISION(pa->pa_class)) {
                        case ASC_PCI_REVISION_3050:
-                               printf(": AdvanSys ABP-9xxUA SCSI adapter\n");
+                               aprint_normal(
+                                   ": AdvanSys ABP-9xxUA SCSI adapter\n");
                                break;
 
                        case ASC_PCI_REVISION_3150:
-                               printf(": AdvanSys ABP-9xxU SCSI adapter\n");
+                               aprint_normal(
+                                   ": AdvanSys ABP-9xxU SCSI adapter\n");
                                break;
                        }
                        break;
 
                default:
-                       printf(": unknown model!\n");
+                       aprint_error(": unknown model!\n");
                        return;
                }
 
@@ -208,7 +211,7 @@
         */
        if (pci_mapreg_map(pa, PCI_BASEADR_IO, PCI_MAPREG_TYPE_IO, 0,
                        &iot, &ioh, NULL, NULL)) {
-               printf("%s: unable to map device registers\n",
+               aprint_error("%s: unable to map device registers\n",
                       sc->sc_dev.dv_xname);
                return;
        }
@@ -233,7 +236,8 @@
         * Map Interrupt line
         */
        if (pci_intr_map(pa, &ih)) {
-               printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
+               aprint_error("%s: couldn't map interrupt\n",
+                   sc->sc_dev.dv_xname);
                return;
        }
        intrstr = pci_intr_string(pc, ih);
@@ -243,13 +247,14 @@
         */
        sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, adv_intr, sc);
        if (sc->sc_ih == NULL) {
-               printf("%s: couldn't establish interrupt", sc->sc_dev.dv_xname);
+               aprint_error("%s: couldn't establish interrupt",
+                   sc->sc_dev.dv_xname);
                if (intrstr != NULL)
-                       printf(" at %s", intrstr);
-               printf("\n");
+                       aprint_normal(" at %s", intrstr);
+               aprint_normal("\n");
                return;
        }
-       printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
+       aprint_normal("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
 
        /*
         * Attach all the sub-devices we can find
diff -r c563db203c28 -r 7891acc23d00 sys/dev/pci/adw_pci.c
--- a/sys/dev/pci/adw_pci.c     Thu Jan 30 23:43:33 2003 +0000
+++ b/sys/dev/pci/adw_pci.c     Fri Jan 31 00:07:39 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adw_pci.c,v 1.13 2002/10/02 16:51:00 thorpej Exp $  */
+/* $NetBSD: adw_pci.c,v 1.14 2003/01/31 00:07:39 thorpej Exp $  */
 
 /*
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adw_pci.c,v 1.13 2002/10/02 16:51:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adw_pci.c,v 1.14 2003/01/31 00:07:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -124,26 +124,30 @@
        u_int32_t       command;
        const char     *intrstr;
 
+       aprint_naive(": SCSI controller\n");
 
        if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ADVSYS)
                switch (PCI_PRODUCT(pa->pa_id)) {
                case PCI_PRODUCT_ADVSYS_WIDE:
                        sc->chip_type = ADW_CHIP_ASC3550;
-                       printf(": AdvanSys ASB-3940UW-00 SCSI adapter\n");
+                       aprint_normal(
+                           ": AdvanSys ASB-3940UW-00 SCSI adapter\n");
                        break;
 
                case PCI_PRODUCT_ADVSYS_U2W:
                        sc->chip_type = ADW_CHIP_ASC38C0800;
-                       printf(": AdvanSys ASB-3940U2W-00 SCSI adapter\n");
+                       aprint_normal(
+                           ": AdvanSys ASB-3940U2W-00 SCSI adapter\n");
                        break;
 
                case PCI_PRODUCT_ADVSYS_U3W:
                        sc->chip_type = ADW_CHIP_ASC38C1600;
-                       printf(": AdvanSys ASB-3940U3W-00 SCSI adapter\n");
+                       aprint_normal(
+                           ": AdvanSys ASB-3940U3W-00 SCSI adapter\n");
                        break;
 
                default:
-                       printf(": unknown model!\n");
+                       aprint_error(": unknown model!\n");
                        return;
                }
 
@@ -164,7 +168,7 @@
         */
        if (pci_mapreg_map(pa, PCI_BASEADR_IO, PCI_MAPREG_TYPE_IO, 0,
                           &iot, &ioh, NULL, NULL)) {
-               printf("%s: unable to map device registers\n",
+               aprint_error("%s: unable to map device registers\n",
                       sc->sc_dev.dv_xname);
                return;
        }
@@ -176,7 +180,7 @@
         * Initialize the board
         */
        if (adw_init(sc)) {
-               printf("%s: adw_init failed", sc->sc_dev.dv_xname);
+               aprint_error("%s: adw_init failed", sc->sc_dev.dv_xname);
                return;
        }
 
@@ -184,7 +188,8 @@
         * Map Interrupt line
         */
        if (pci_intr_map(pa, &ih)) {
-               printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
+               aprint_error("%s: couldn't map interrupt\n",
+                   sc->sc_dev.dv_xname);
                return;
        }
        intrstr = pci_intr_string(pc, ih);
@@ -194,13 +199,14 @@
         */
        sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, adw_intr, sc);
        if (sc->sc_ih == NULL) {
-               printf("%s: couldn't establish interrupt", sc->sc_dev.dv_xname);
+               aprint_error("%s: couldn't establish interrupt",
+                   sc->sc_dev.dv_xname);
                if (intrstr != NULL)
-                       printf(" at %s", intrstr);
-               printf("\n");
+                       aprint_normal(" at %s", intrstr);
+               aprint_normal("\n");
                return;
        }
-       printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
+       aprint_normal("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
 
        /*
         * Attach all the sub-devices we can find
diff -r c563db203c28 -r 7891acc23d00 sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Thu Jan 30 23:43:33 2003 +0000
+++ b/sys/dev/pci/agp.c Fri Jan 31 00:07:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp.c,v 1.23 2002/12/13 11:32:50 scw Exp $     */
+/*     $NetBSD: agp.c,v 1.24 2003/01/31 00:07:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.23 2002/12/13 11:32:50 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.24 2003/01/31 00:07:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -259,6 +259,8 @@



Home | Main Index | Thread Index | Old Index