Module Name: src Committed By: msaitoh Date: Thu Jul 14 10:19:06 UTC 2016
Modified Files: src/sys/arch/i386/pci: glxsb.c src/sys/arch/i386/pnpbios: lpt_pnpbios.c wss_pnpbios.c ym_pnpbios.c src/sys/dev: audio.c midi.c src/sys/dev/ata: ata_raid.c src/sys/dev/cardbus: adv_cardbus.c if_ral_cardbus.c if_tlp_cardbus.c src/sys/dev/eisa: cac_eisa.c if_fea.c mlx_eisa.c src/sys/dev/ic: i82586.c interwave.c mlx.c opl.c pckbc.c src/sys/dev/ir: cir.c src/sys/dev/isa: dpt_isa.c ess.c i82365_isa.c if_ep_isa.c if_iy.c if_ntwoc_isa.c if_tr_isa.c isic_isa.c mcd.c mpu_isa.c rtfps.c seagate.c spkr.c tcic2_isa.c wt.c src/sys/dev/isapnp: aha_isapnp.c gus_isapnp.c i82365_isapnp.c if_ep_isapnp.c if_tr_isapnp.c src/sys/dev/mca: edc_mca.c esp_mca.c mca.c src/sys/dev/pci: ibmcd.c if_ntwoc_pci.c if_sip.c if_txp.c isic_pci.c iwic_pci.c jmide.c njs_pci.c pwdog.c sv.c wcfb.c src/sys/dev/pci/bktr: bktr_os.c src/sys/dev/scsipi: ses.c Log Message: - Use aprint*() more in xxx_attach(). - Add missing aprint_naive("\n"). - Remove extra spaces and tabs. - KNF. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/pci/glxsb.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/pnpbios/lpt_pnpbios.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/pnpbios/wss_pnpbios.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/i386/pnpbios/ym_pnpbios.c cvs rdiff -u -r1.267 -r1.268 src/sys/dev/audio.c cvs rdiff -u -r1.84 -r1.85 src/sys/dev/midi.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ata/ata_raid.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/cardbus/adv_cardbus.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/cardbus/if_ral_cardbus.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/cardbus/if_tlp_cardbus.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/eisa/cac_eisa.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/eisa/if_fea.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/eisa/mlx_eisa.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/i82586.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/interwave.c cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/mlx.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ic/opl.c cvs rdiff -u -r1.58 -r1.59 src/sys/dev/ic/pckbc.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ir/cir.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/isa/dpt_isa.c \ src/sys/dev/isa/mpu_isa.c cvs rdiff -u -r1.82 -r1.83 src/sys/dev/isa/ess.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/isa/i82365_isa.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/isa/if_ep_isa.c cvs rdiff -u -r1.96 -r1.97 src/sys/dev/isa/if_iy.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isa/if_ntwoc_isa.c \ src/sys/dev/isa/tcic2_isa.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/if_tr_isa.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/isa/isic_isa.c cvs rdiff -u -r1.115 -r1.116 src/sys/dev/isa/mcd.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/isa/rtfps.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/isa/seagate.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/isa/spkr.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/isa/wt.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/isapnp/aha_isapnp.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/isapnp/gus_isapnp.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/isapnp/i82365_isapnp.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/isapnp/if_ep_isapnp.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isapnp/if_tr_isapnp.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/mca/edc_mca.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/mca/esp_mca.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/mca/mca.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ibmcd.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/if_ntwoc_pci.c cvs rdiff -u -r1.162 -r1.163 src/sys/dev/pci/if_sip.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_txp.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/isic_pci.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/iwic_pci.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/jmide.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/njs_pci.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/pwdog.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/sv.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/wcfb.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/bktr/bktr_os.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/scsipi/ses.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/i386/pci/glxsb.c diff -u src/sys/arch/i386/pci/glxsb.c:1.13 src/sys/arch/i386/pci/glxsb.c:1.14 --- src/sys/arch/i386/pci/glxsb.c:1.13 Mon Apr 13 16:21:54 2015 +++ src/sys/arch/i386/pci/glxsb.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: glxsb.c,v 1.13 2015/04/13 16:21:54 riastradh Exp $ */ +/* $NetBSD: glxsb.c,v 1.14 2016/07/14 10:19:05 msaitoh Exp $ */ /* $OpenBSD: glxsb.c,v 1.7 2007/02/12 14:31:45 tom Exp $ */ /* @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: glxsb.c,v 1.13 2015/04/13 16:21:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: glxsb.c,v 1.14 2016/07/14 10:19:05 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -215,7 +215,8 @@ glxsb_attach(device_t parent, device_t s msr = rdmsr(SB_GLD_MSR_CAP); if ((msr & 0xFFFF00) != 0x130400) { - printf(": unknown ID 0x%x\n", (int) ((msr & 0xFFFF00) >> 16)); + aprint_error(": unknown ID 0x%x\n", + (int)((msr & 0xFFFF00) >> 16)); return; } @@ -225,7 +226,7 @@ glxsb_attach(device_t parent, device_t s if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_iot, &sc->sc_ioh, &membase, &memsize)) { - printf(": can't find mem space\n"); + aprint_error(": can't find mem space\n"); return; } @@ -559,8 +560,8 @@ glxsb_crypto_process(void *aux, struct c cuio_copyback((struct uio *)crp->crp_buf, crd->crd_skip + offset, len, op_dst); else - memcpy((char *)crp->crp_buf + crd->crd_skip + offset, op_dst, - len); + memcpy((char *)crp->crp_buf + crd->crd_skip + offset, + op_dst, len); offset += len; tlen -= len; @@ -578,7 +579,8 @@ glxsb_crypto_process(void *aux, struct c * time. */ if (crd->crd_flags & CRD_F_ENCRYPT) { - memcpy(piv, op_dst + len - sizeof(op_iv), sizeof(op_iv)); + memcpy(piv, op_dst + len - sizeof(op_iv), + sizeof(op_iv)); } else { /* Decryption, only need this if another iteration */ if (tlen > 0) { @@ -609,8 +611,8 @@ glxsb_dma_alloc(struct glxsb_softc *sc, rc = bus_dmamap_create(sc->sc_dmat, size, dma->dma_nsegs, size, 0, BUS_DMA_NOWAIT, &dma->dma_map); if (rc != 0) { - aprint_error_dev(sc->sc_dev, "couldn't create DMA map for %d bytes (%d)\n", - size, rc); + aprint_error_dev(sc->sc_dev, + "couldn't create DMA map for %d bytes (%d)\n", size, rc); goto fail0; } @@ -618,7 +620,8 @@ glxsb_dma_alloc(struct glxsb_softc *sc, rc = bus_dmamem_alloc(sc->sc_dmat, size, SB_AES_ALIGN, 0, &dma->dma_seg, dma->dma_nsegs, &dma->dma_nsegs, BUS_DMA_NOWAIT); if (rc != 0) { - aprint_error_dev(sc->sc_dev, "couldn't allocate DMA memory of %d bytes (%d)\n", + aprint_error_dev(sc->sc_dev, + "couldn't allocate DMA memory of %d bytes (%d)\n", size, rc); goto fail1; @@ -627,8 +630,8 @@ glxsb_dma_alloc(struct glxsb_softc *sc, rc = bus_dmamem_map(sc->sc_dmat, &dma->dma_seg, 1, size, &dma->dma_vaddr, BUS_DMA_NOWAIT); if (rc != 0) { - aprint_error_dev(sc->sc_dev, "couldn't map DMA memory for %d bytes (%d)\n", - size, rc); + aprint_error_dev(sc->sc_dev, + "couldn't map DMA memory for %d bytes (%d)\n", size, rc); goto fail2; } @@ -636,8 +639,8 @@ glxsb_dma_alloc(struct glxsb_softc *sc, rc = bus_dmamap_load(sc->sc_dmat, dma->dma_map, dma->dma_vaddr, size, NULL, BUS_DMA_NOWAIT); if (rc != 0) { - aprint_error_dev(sc->sc_dev, "couldn't load DMA memory for %d bytes (%d)\n", - size, rc); + aprint_error_dev(sc->sc_dev, + "couldn't load DMA memory for %d bytes (%d)\n", size, rc); goto fail3; } Index: src/sys/arch/i386/pnpbios/lpt_pnpbios.c diff -u src/sys/arch/i386/pnpbios/lpt_pnpbios.c:1.12 src/sys/arch/i386/pnpbios/lpt_pnpbios.c:1.13 --- src/sys/arch/i386/pnpbios/lpt_pnpbios.c:1.12 Fri Jul 1 18:14:15 2011 +++ src/sys/arch/i386/pnpbios/lpt_pnpbios.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lpt_pnpbios.c,v 1.12 2011/07/01 18:14:15 dyoung Exp $ */ +/* $NetBSD: lpt_pnpbios.c,v 1.13 2016/07/14 10:19:05 msaitoh Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpt_pnpbios.c,v 1.12 2011/07/01 18:14:15 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt_pnpbios.c,v 1.13 2016/07/14 10:19:05 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,12 +77,13 @@ lpt_pnpbios_attach(device_t parent, devi sc->sc_dev = self; - if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) { - printf(": can't map i/o space\n"); + aprint_naive("\n"); + if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) { + aprint_error(": can't map i/o space\n"); return; } - printf("\n"); + aprint_normal("\n"); pnpbios_print_devres(self, aa); lpt_attach_subr(sc); Index: src/sys/arch/i386/pnpbios/wss_pnpbios.c diff -u src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.20 src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.21 --- src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.20 Fri Jul 1 18:14:15 2011 +++ src/sys/arch/i386/pnpbios/wss_pnpbios.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wss_pnpbios.c,v 1.20 2011/07/01 18:14:15 dyoung Exp $ */ +/* $NetBSD: wss_pnpbios.c,v 1.21 2016/07/14 10:19:05 msaitoh Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.20 2011/07/01 18:14:15 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.21 2016/07/14 10:19:05 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -88,20 +88,18 @@ wss_pnpbios_hints_index(const char *idst } int -wss_pnpbios_match(device_t parent, - cfdata_t match, void *aux) +wss_pnpbios_match(device_t parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; if (wss_pnpbios_hints_index(aa->idstr) == -1) - return (0); + return 0; - return (2); /* beat sb */ + return 2; /* beat sb */ } void -wss_pnpbios_attach(device_t parent, device_t self, - void *aux) +wss_pnpbios_attach(device_t parent, device_t self, void *aux) { struct wss_softc *sc = device_private(self); struct pnpbiosdev_attach_args *aa = aux; @@ -115,16 +113,17 @@ wss_pnpbios_attach(device_t parent, devi static u_char dma_bits[4] = {1, 2, 0, 3}; #endif + aprint_naive("\n"); wph = &wss_pnpbios_hints[wss_pnpbios_hints_index(aa->idstr)]; if (pnpbios_io_map(aa->pbt, aa->resc, wph->io_region_idx_ad1848, &sc->sc_iot, &sc->sc_ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } if (pnpbios_io_map(aa->pbt, aa->resc, wph->io_region_idx_opl, &sc->sc_iot, &sc->sc_opl_ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -132,16 +131,16 @@ wss_pnpbios_attach(device_t parent, devi sc->wss_ic = aa->ic; if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->wss_irq, NULL)) { - printf(": can't get IRQ\n"); + aprint_error(": can't get IRQ\n"); return; } if (pnpbios_getdmachan(aa->pbt, aa->resc, 0, &sc->wss_playdrq)) { - printf(": can't get DMA channel\n"); + aprint_error(": can't get DMA channel\n"); return; } if (pnpbios_getdmachan(aa->pbt, aa->resc, 1, &sc->wss_recdrq)) { - printf(": can't get recording DMA channel"); + aprint_error(": can't get recording DMA channel"); sc->wss_recdrq = sc->wss_playdrq; } @@ -149,10 +148,11 @@ wss_pnpbios_attach(device_t parent, devi bus_space_subregion(sc->sc_iot, sc->sc_ioh, wph->offset_ad1848, 4, &sc->sc_ad1848.sc_ad1848.sc_ioh); - printf("\n"); + aprint_normal("\n"); pnpbios_print_devres(self, aa); - printf("%s", device_xname(self)); + aprint_naive("%s", device_xname(self)); + aprint_normal("%s", device_xname(self)); if (!ad1848_isa_probe(&sc->sc_ad1848)) { aprint_error_dev(self, "ad1848 probe failed\n"); @@ -163,7 +163,7 @@ wss_pnpbios_attach(device_t parent, devi #if 0 /* XXX recdrq */ bus_space_write_1(sc->sc_iot, sc->sc_ioh, WSS_CONFIG, - (interrupt_bits[sc->wss_irq] | dma_bits[sc->wss_playdrq])); + (interrupt_bits[sc->wss_irq] | dma_bits[sc->wss_playdrq])); #endif arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; Index: src/sys/arch/i386/pnpbios/ym_pnpbios.c diff -u src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.17 src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.18 --- src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.17 Fri Jul 1 18:14:15 2011 +++ src/sys/arch/i386/pnpbios/ym_pnpbios.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ym_pnpbios.c,v 1.17 2011/07/01 18:14:15 dyoung Exp $ */ +/* $NetBSD: ym_pnpbios.c,v 1.18 2016/07/14 10:19:05 msaitoh Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.17 2011/07/01 18:14:15 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.18 2016/07/14 10:19:05 msaitoh Exp $"); #include "mpu_ym.h" @@ -51,12 +51,12 @@ __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c #include <i386/pnpbios/pnpbiosvar.h> -#include <dev/ic/ad1848reg.h> +#include <dev/ic/ad1848reg.h> #include <dev/isa/ad1848var.h> - + #include <dev/ic/cs4231reg.h> #include <dev/isa/cs4231var.h> - + #include <dev/ic/opl3sa3reg.h> #include <dev/isa/wssreg.h> #include <dev/isa/ymvar.h> @@ -68,8 +68,7 @@ CFATTACH_DECL_NEW(ym_pnpbios, sizeof(str ym_pnpbios_match, ym_pnpbios_attach, NULL, NULL); int -ym_pnpbios_match(device_t parent, - cfdata_t match, void *aux) +ym_pnpbios_match(device_t parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; @@ -80,8 +79,7 @@ ym_pnpbios_match(device_t parent, } void -ym_pnpbios_attach(device_t parent, device_t self, - void *aux) +ym_pnpbios_attach(device_t parent, device_t self, void *aux) { struct ym_softc *sc = device_private(self); struct ad1848_softc *ac = &sc->sc_ad1848.sc_ad1848; @@ -89,56 +87,58 @@ ym_pnpbios_attach(device_t parent, devic ac->sc_dev = self; + aprint_naive("\n"); if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_sb_ioh) != 0) { - printf(": can't map sb i/o space\n"); + aprint_error(": can't map sb i/o space\n"); return; } if (pnpbios_io_map(aa->pbt, aa->resc, 1, &sc->sc_iot, &sc->sc_ioh) != 0) { - printf(": can't map sb i/o space\n"); + aprint_error(": can't map sb i/o space\n"); return; } if (pnpbios_io_map(aa->pbt, aa->resc, 2, &sc->sc_iot, &sc->sc_opl_ioh) != 0) { - printf(": can't map opl i/o space\n"); + aprint_error(": can't map opl i/o space\n"); return; } #if NMPU_YM > 0 if (pnpbios_io_map(aa->pbt, aa->resc, 3, &sc->sc_iot, &sc->sc_mpu_ioh) != 0) { - printf(": can't map mpu i/o space\n"); + aprint_error(": can't map mpu i/o space\n"); return; } #endif if (pnpbios_io_map(aa->pbt, aa->resc, 4, &sc->sc_iot, &sc->sc_controlioh) != 0) { - printf(": can't map control i/o space\n"); + aprint_error(": can't map control i/o space\n"); return; } sc->sc_ic = aa->ic; if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->ym_irq, NULL)) { - printf(": can't get IRQ\n"); + aprint_error(": can't get IRQ\n"); return; } if (pnpbios_getdmachan(aa->pbt, aa->resc, 0, &sc->ym_playdrq)) { - printf(": can't get DMA channel\n"); + aprint_error(": can't get DMA channel\n"); return; } if (pnpbios_getdmachan(aa->pbt, aa->resc, 1, &sc->ym_recdrq)) sc->ym_recdrq = sc->ym_playdrq; /* half-duplex mode */ - printf("\n"); + aprint_normal("\n"); pnpbios_print_devres(self, aa); - printf("%s", device_xname(self)); + aprint_naive("%s", device_xname(self)); + aprint_normal("%s", device_xname(self)); ac->sc_iot = sc->sc_iot; - if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, WSS_CODEC, AD1848_NPORT, - &ac->sc_ioh)) { + if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, WSS_CODEC, + AD1848_NPORT, &ac->sc_ioh)) { aprint_error_dev(self, "bus_space_subregion failed\n"); return; } Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.267 src/sys/dev/audio.c:1.268 --- src/sys/dev/audio.c:1.267 Sat Apr 23 10:15:31 2016 +++ src/sys/dev/audio.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.267 2016/04/23 10:15:31 skrll Exp $ */ +/* $NetBSD: audio.c,v 1.268 2016/07/14 10:19:05 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -130,7 +130,7 @@ * query_encoding - x * set_params - x * round_blocksize - x - * commit_settings - x + * commit_settings - x * init_output x x * init_input x x * start_output x x @@ -155,7 +155,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.267 2016/04/23 10:15:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.268 2016/07/14 10:19:05 msaitoh Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -320,10 +320,8 @@ void au_get_gain(struct audio_softc *, s int au_set_port(struct audio_softc *, struct au_mixer_ports *, u_int); int au_get_port(struct audio_softc *, struct au_mixer_ports *); -int au_get_lr_value(struct audio_softc *, mixer_ctrl_t *, - int *, int *); -int au_set_lr_value(struct audio_softc *, mixer_ctrl_t *, - int, int); +int au_get_lr_value(struct audio_softc *, mixer_ctrl_t *, int *, int *); +int au_set_lr_value(struct audio_softc *, mixer_ctrl_t *, int, int); int au_portof(struct audio_softc *, char *, int); typedef struct uio_fetcher { @@ -413,7 +411,7 @@ audioattach(device_t parent, device_t se cv_init(&sc->sc_lchan, "audiolk"); if (hwp == 0 || hwp->get_locks == 0) { - printf(": missing method\n"); + aprint_error(": missing method\n"); panic("audioattach"); } @@ -431,7 +429,7 @@ audioattach(device_t parent, device_t se hwp->get_port == 0 || hwp->query_devinfo == 0 || hwp->get_props == 0) { - printf(": missing method\n"); + aprint_error(": missing method\n"); sc->hw_if = 0; return; } @@ -1686,7 +1684,7 @@ audio_open(dev_t dev, struct audio_softc sc->sc_playdrop = 0; mutex_enter(sc->sc_intr_lock); - sc->sc_full_duplex = + sc->sc_full_duplex = (flags & (FWRITE|FREAD)) == (FWRITE|FREAD) && (audio_get_props(sc) & AUDIO_PROP_FULLDUPLEX); mutex_exit(sc->sc_intr_lock); @@ -1846,8 +1844,7 @@ audio_drain(struct audio_softc *sc) */ /* ARGSUSED */ int -audio_close(struct audio_softc *sc, int flags, int ifmt, - struct lwp *l) +audio_close(struct audio_softc *sc, int flags, int ifmt, struct lwp *l) { const struct audio_hw_if *hw; @@ -3765,9 +3762,11 @@ audiosetinfo(struct audio_softc *sc, str } #ifdef AUDIO_DEBUG if (audiodebug > 1 && nr > 0) - audio_print_params("audiosetinfo() After setting record params:", &sc->sc_rparams); + audio_print_params("audiosetinfo() After setting record params:", + &sc->sc_rparams); if (audiodebug > 1 && np > 0) - audio_print_params("audiosetinfo() After setting play params:", &sc->sc_pparams); + audio_print_params("audiosetinfo() After setting play params:", + &sc->sc_pparams); #endif if (SPECIFIED(p->port)) { @@ -4107,8 +4106,7 @@ mixer_signal(struct audio_softc *sc) */ /* ARGSUSED */ int -mixer_close(struct audio_softc *sc, int flags, int ifmt, - struct lwp *l) +mixer_close(struct audio_softc *sc, int flags, int ifmt, struct lwp *l) { KASSERT(mutex_owned(sc->sc_lock)); Index: src/sys/dev/midi.c diff -u src/sys/dev/midi.c:1.84 src/sys/dev/midi.c:1.85 --- src/sys/dev/midi.c:1.84 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/midi.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.84 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: midi.c,v 1.85 2016/07/14 10:19:05 msaitoh Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.84 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.85 2016/07/14 10:19:05 msaitoh Exp $"); #include "midi.h" #include "sequencer.h" @@ -165,7 +165,7 @@ midiattach(device_t parent, device_t sel hwp->close == 0 || hwp->output == 0 || hwp->getinfo == 0) { - printf("midi: missing method\n"); + aprint_error_dev(self, "missing method\n"); return; } #endif @@ -226,7 +226,7 @@ mididetach(device_t self, int flags) */ mn = device_unit(self); vdevgone(maj, mn, mn, VCHR); - + if (!(sc->props & MIDI_PROP_NO_OUTPUT)) { evcnt_detach(&sc->xmt.bytesDiscarded); evcnt_detach(&sc->xmt.incompleteMessages); @@ -312,7 +312,7 @@ midi_attach(struct midi_softc *sc) EVCNT_TYPE_MISC, NULL, device_xname(sc->dev), "rcv incomplete msgs"); } - + aprint_naive("\n"); aprint_normal(": %s\n", mi.name); @@ -435,18 +435,18 @@ midi_fst(struct midi_state *s, u_char c, if (c >= 0xf8) { /* All realtime messages bypass state machine */ if (c == 0xf9 || c == 0xfd) { - DPRINTF( ("midi_fst: s=%p c=0x%02x undefined\n", + DPRINTF( ("midi_fst: s=%p c=0x%02x undefined\n", s, c)); s->bytesDiscarded.ev_count++; return FST_ERR; } - DPRINTFN(9, ("midi_fst: s=%p System Real-Time data=0x%02x\n", + DPRINTFN(9, ("midi_fst: s=%p System Real-Time data=0x%02x\n", s, c)); s->msg[2] = c; FST_RETURN(2,3,FST_RT); } - DPRINTFN(4, ("midi_fst: s=%p data=0x%02x state=%d\n", + DPRINTFN(4, ("midi_fst: s=%p data=0x%02x state=%d\n", s, c, s->state)); switch (s->state | MIDI_CAT(c)) { /* break ==> return FST_MORE */ @@ -465,7 +465,7 @@ midi_fst(struct midi_state *s, u_char c, default: goto protocol_violation; } break; - + case MIDI_IN_RUN1_1 | MIDI_CAT_STATUS1: if (c == s->msg[0]) { s->state = MIDI_IN_RNX0_1; @@ -478,7 +478,7 @@ midi_fst(struct midi_state *s, u_char c, s->state = MIDI_IN_RUN0_1; s->msg[0] = c; break; - + case MIDI_IN_RUN2_2 | MIDI_CAT_STATUS2: case MIDI_IN_RXX2_2 | MIDI_CAT_STATUS2: if (c == s->msg[0]) { @@ -700,12 +700,12 @@ midi_in(void *addr, int data) if ((sc->flags & FREAD) == 0) return; /* discard data if not reading */ - + sxp_again: do { got = midi_fst(&sc->rcv, data, FST_CANON); } while (got == FST_HUH); - + switch (got) { case FST_MORE: case FST_ERR: @@ -757,7 +757,7 @@ sxp_again: if (count > buf_lim - buf_cur || 1 > idx_lim - idx_cur) { sc->rcv.bytesDiscarded.ev_count += count; - DPRINTF(("midi_in: buffer full, discard data=0x%02x\n", + DPRINTF(("midi_in: buffer full, discard data=0x%02x\n", sc->rcv.pos[0])); return; } @@ -828,18 +828,18 @@ midiopen(dev_t dev, int flags, int ifmt, sc->xmt.state = MIDI_IN_START; sc->xmt.pos = sc->xmt.msg; sc->xmt.end = sc->xmt.msg; - + /* copy error counters so an ioctl (TBA) can give since-open stats */ sc->rcv.atOpen.bytesDiscarded = sc->rcv.bytesDiscarded.ev_count; sc->rcv.atQuery.bytesDiscarded = sc->rcv.bytesDiscarded.ev_count; - + sc->xmt.atOpen.bytesDiscarded = sc->xmt.bytesDiscarded.ev_count; sc->xmt.atQuery.bytesDiscarded = sc->xmt.bytesDiscarded.ev_count; - + /* and the buffers */ midi_initbuf(&sc->outbuf); midi_initbuf(&sc->inbuf); - + /* and the receive flags */ sc->rcv_expect_asense = 0; sc->rcv_quiescent = 0; @@ -956,9 +956,9 @@ midiread(dev_t dev, struct uio *uio, int MB_IDX_LEN(*idx_cur) - appetite); } KASSERT(buf_cur + appetite <= buf_lim); - + /* move the bytes */ - if (appetite > 0) { + if (appetite > 0) { first = 0; /* we know we won't return empty-handed */ /* do two uiomoves if data wrap around end of buf */ if (buf_cur + appetite > buf_end) { @@ -989,7 +989,7 @@ midiread(dev_t dev, struct uio *uio, int } buf_cur += appetite; } - + MIDI_BUF_WRAP(idx); MIDI_BUF_WRAP(buf); MIDI_BUF_CONSUMER_WBACK(mb,idx); @@ -1042,7 +1042,7 @@ midi_rcv_asense(void *arg) softint_schedule(sc->sih); mutex_exit(sc->lock); return; - } + } sc->rcv_quiescent = 1; callout_schedule(&sc->rcv_asense_co, MIDI_RCV_ASENSE_PERIOD); mutex_exit(sc->lock); @@ -1055,7 +1055,7 @@ midi_xmt_asense(void *arg) int error, armed; sc = arg; - + mutex_enter(sc->lock); if (sc->pbus || sc->dying || !sc->isopen) { mutex_exit(sc->lock); @@ -1101,9 +1101,9 @@ midi_msg_out(struct midi_softc *sc, u_ch idx_lim = *idxl; buf_cur = *buf; buf_lim = *bufl; - + length = MB_IDX_LEN(*idx_cur); - + for ( cp = contig, ep = cp + length; cp < ep;) { *cp++ = *buf_cur++; MIDI_BUF_WRAP(buf); @@ -1134,7 +1134,7 @@ midi_msg_out(struct midi_softc *sc, u_ch default: error = EIO; } - + if (!error) { ++ idx_cur; MIDI_BUF_WRAP(idx); @@ -1143,7 +1143,7 @@ midi_msg_out(struct midi_softc *sc, u_ch *buf = buf_cur; *bufl = buf_lim; } - + return error; } @@ -1265,7 +1265,7 @@ midi_intr_out(struct midi_softc *sc) MIDI_BUF_CONSUMER_INIT(mb,idx); MIDI_BUF_CONSUMER_INIT(mb,buf); - + while (idx_cur != idx_lim) { if (sc->hw_if_ext) { error = midi_msg_out(sc, &idx_cur, &idx_lim, @@ -1344,7 +1344,7 @@ real_writebytes(struct midi_softc *sc, u iend = ibuf + cc; mb = &sc->outbuf; arming = 0; - + /* * If the hardware uses the extended hw_if, pass it canonicalized * messages (or compressed ones if it specifically requests, using @@ -1361,7 +1361,7 @@ real_writebytes(struct midi_softc *sc, u MIDI_BUF_PRODUCER_INIT(mb,idx); MIDI_BUF_PRODUCER_INIT(mb,buf); - + while (ibuf < iend) { got = midi_fst(&sc->xmt, *ibuf, form); ++ibuf; @@ -1478,7 +1478,7 @@ midiwrite(dev_t dev, struct uio *uio, in bufspace = MIDI_BUF_PRODUCER_REFRESH(mb,buf) - buf_cur; if (idxspace >= 1 && bufspace >= 3 && !pollout) break; - DPRINTFN(8,("midi_write: sleep idx=%zd buf=%zd\n", + DPRINTFN(8,("midi_write: sleep idx=%zd buf=%zd\n", idxspace, bufspace)); if (ioflag & IO_NDELAY) { /* @@ -1537,7 +1537,7 @@ midiwrite(dev_t dev, struct uio *uio, in #endif if (error) break; - + /* * The number of bytes we extracted being calculated to * definitely fit in the buffer even with canonicalization, @@ -1620,7 +1620,7 @@ midiioctl(dev_t dev, u_long cmd, void *a case FIONBIO: /* All handled in the upper layer. */ break; - + case FIONREAD: /* * This code relies on the current implementation of midi_in Index: src/sys/dev/ata/ata_raid.c diff -u src/sys/dev/ata/ata_raid.c:1.36 src/sys/dev/ata/ata_raid.c:1.37 --- src/sys/dev/ata/ata_raid.c:1.36 Thu Aug 20 14:40:17 2015 +++ src/sys/dev/ata/ata_raid.c Thu Jul 14 10:19:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.36 2015/08/20 14:40:17 christos Exp $ */ +/* $NetBSD: ata_raid.c,v 1.37 2016/07/14 10:19:05 msaitoh Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.36 2015/08/20 14:40:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.37 2016/07/14 10:19:05 msaitoh Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -99,7 +99,8 @@ ataraidattach(int count) * the logical disks configured by ataraid. */ if (config_finalize_register(NULL, ata_raid_finalize) != 0) - printf("WARNING: unable to register ATA RAID finalizer\n"); + aprint_normal("WARNING: " + "unable to register ATA RAID finalizer\n"); } /* Index: src/sys/dev/cardbus/adv_cardbus.c diff -u src/sys/dev/cardbus/adv_cardbus.c:1.29 src/sys/dev/cardbus/adv_cardbus.c:1.30 --- src/sys/dev/cardbus/adv_cardbus.c:1.29 Sat Oct 27 17:18:15 2012 +++ src/sys/dev/cardbus/adv_cardbus.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: adv_cardbus.c,v 1.29 2012/10/27 17:18:15 chs Exp $ */ +/* $NetBSD: adv_cardbus.c,v 1.30 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.29 2012/10/27 17:18:15 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.30 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,29 +118,31 @@ adv_cardbus_attach(device_t parent, devi if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_ADVSYS) { switch (PCI_PRODUCT(ca->ca_id)) { case PCI_PRODUCT_ADVSYS_1200A: - printf(": AdvanSys ASC1200A SCSI adapter\n"); + aprint_normal(": AdvanSys ASC1200A SCSI adapter\n"); latency = 0; break; case PCI_PRODUCT_ADVSYS_1200B: - printf(": AdvanSys ASC1200B SCSI adapter\n"); + aprint_normal(": AdvanSys ASC1200B SCSI adapter\n"); latency = 0; break; case PCI_PRODUCT_ADVSYS_ULTRA: switch (PCI_REVISION(ca->ca_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; } } @@ -173,7 +175,7 @@ adv_cardbus_attach(device_t parent, devi csc->sc_csr |= PCI_COMMAND_IO_ENABLE; } else { csc->sc_bar = 0; - aprint_error_dev(sc->sc_dev, "unable to map device registers\n"); + aprint_error_dev(self, "unable to map device registers\n"); return; } @@ -208,7 +210,7 @@ adv_cardbus_attach(device_t parent, devi * Initialize the board */ if (adv_init(sc)) { - printf("adv_init failed\n"); + aprint_error_dev(self, "adv_init failed\n"); return; } @@ -217,8 +219,7 @@ adv_cardbus_attach(device_t parent, devi */ sc->sc_ih = Cardbus_intr_establish(ct, IPL_BIO, adv_intr, sc); if (sc->sc_ih == NULL) { - aprint_error_dev(sc->sc_dev, - "unable to establish interrupt\n"); + aprint_error_dev(self, "unable to establish interrupt\n"); return; } Index: src/sys/dev/cardbus/if_ral_cardbus.c diff -u src/sys/dev/cardbus/if_ral_cardbus.c:1.23 src/sys/dev/cardbus/if_ral_cardbus.c:1.24 --- src/sys/dev/cardbus/if_ral_cardbus.c:1.23 Sat Feb 18 13:38:35 2012 +++ src/sys/dev/cardbus/if_ral_cardbus.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ral_cardbus.c,v 1.23 2012/02/18 13:38:35 drochner Exp $ */ +/* $NetBSD: if_ral_cardbus.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $ */ /* $OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $ */ /*- @@ -22,7 +22,7 @@ * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.23 2012/02/18 13:38:35 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> @@ -104,8 +104,7 @@ void ral_cardbus_power(struct rt2560_sof void ral_cardbus_setup(struct ral_cardbus_softc *); int -ral_cardbus_match(device_t parent, - cfdata_t cfdata, void *aux) +ral_cardbus_match(device_t parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; @@ -125,8 +124,7 @@ ral_cardbus_match(device_t parent, } void -ral_cardbus_attach(device_t parent, device_t self, - void *aux) +ral_cardbus_attach(device_t parent, device_t self, void *aux) { struct ral_cardbus_softc *csc = device_private(self); struct rt2560_softc *sc = &csc->sc_sc; @@ -158,7 +156,7 @@ ral_cardbus_attach(device_t parent, devi PCI_MAPREG_TYPE_MEM, 0, &sc->sc_st, &sc->sc_sh, &base, &csc->sc_mapsize); if (error != 0) { - printf(": could not map memory space\n"); + aprint_error(": could not map memory space\n"); return; } Index: src/sys/dev/cardbus/if_tlp_cardbus.c diff -u src/sys/dev/cardbus/if_tlp_cardbus.c:1.70 src/sys/dev/cardbus/if_tlp_cardbus.c:1.71 --- src/sys/dev/cardbus/if_tlp_cardbus.c:1.70 Mon Aug 1 11:20:27 2011 +++ src/sys/dev/cardbus/if_tlp_cardbus.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_cardbus.c,v 1.70 2011/08/01 11:20:27 drochner Exp $ */ +/* $NetBSD: if_tlp_cardbus.c,v 1.71 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.70 2011/08/01 11:20:27 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.71 2016/07/14 10:19:06 msaitoh Exp $"); #include "opt_inet.h" @@ -195,7 +195,8 @@ tlp_cardbus_lookup(const struct cardbus_ } void -tlp_cardbus_get_quirks(struct tulip_cardbus_softc *csc, const u_int8_t *enaddr, const struct tlp_cardbus_quirks *tpq) +tlp_cardbus_get_quirks(struct tulip_cardbus_softc *csc, const u_int8_t *enaddr, + const struct tlp_cardbus_quirks *tpq) { for (; tpq->tpq_func != NULL; tpq++) { @@ -209,8 +210,7 @@ tlp_cardbus_get_quirks(struct tulip_card } int -tlp_cardbus_match(device_t parent, cfdata_t match, - void *aux) +tlp_cardbus_match(device_t parent, cfdata_t match, void *aux) { struct cardbus_attach_args *ca = aux; @@ -221,8 +221,7 @@ tlp_cardbus_match(device_t parent, cfdat } void -tlp_cardbus_attach(device_t parent, device_t self, - void *aux) +tlp_cardbus_attach(device_t parent, device_t self, void *aux) { struct tulip_cardbus_softc *csc = device_private(self); struct tulip_softc *sc = &csc->sc_tulip; @@ -293,7 +292,7 @@ tlp_cardbus_attach(device_t parent, devi break; } - printf(": %s Ethernet, pass %d.%d\n", + aprint_normal(": %s Ethernet, pass %d.%d\n", tlp_chip_name(sc->sc_chip), (sc->sc_rev >> 4) & 0xf, sc->sc_rev & 0xf); @@ -379,8 +378,8 @@ tlp_cardbus_attach(device_t parent, devi * MII-over-SIO, with no special reset routine. */ if (sc->sc_mediasw == NULL) { - printf("%s: defaulting to MII-over-SIO; no bets...\n", - device_xname(self)); + aprint_normal("%s: defaulting to MII-over-SIO; " + "no bets...\n", device_xname(self)); sc->sc_mediasw = &tlp_sio_mii_mediasw; } break; @@ -421,8 +420,7 @@ tlp_cardbus_attach(device_t parent, devi default: cant_cope: - printf("%s: sorry, unable to handle your board\n", - device_xname(self)); + aprint_error_dev(self, "sorry, unable to handle your board\n"); return; } @@ -593,8 +591,7 @@ tlp_cardbus_x3201_reset(struct tulip_sof } void -tlp_cardbus_lxt_quirks(struct tulip_cardbus_softc *csc, - const u_int8_t *enaddr) +tlp_cardbus_lxt_quirks(struct tulip_cardbus_softc *csc, const u_int8_t *enaddr) { struct tulip_softc *sc = &csc->sc_tulip; Index: src/sys/dev/eisa/cac_eisa.c diff -u src/sys/dev/eisa/cac_eisa.c:1.23 src/sys/dev/eisa/cac_eisa.c:1.24 --- src/sys/dev/eisa/cac_eisa.c:1.23 Sat Mar 29 19:28:24 2014 +++ src/sys/dev/eisa/cac_eisa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cac_eisa.c,v 1.23 2014/03/29 19:28:24 christos Exp $ */ +/* $NetBSD: cac_eisa.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.23 2014/03/29 19:28:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -113,8 +113,7 @@ static struct cac_eisa_type { }; static int -cac_eisa_match(device_t parent, cfdata_t match, - void *aux) +cac_eisa_match(device_t parent, cfdata_t match, void *aux) { struct eisa_attach_args *ea; int i; @@ -148,7 +147,7 @@ cac_eisa_attach(device_t parent, device_ if (bus_space_map(iot, EISA_SLOT_ADDR(ea->ea_slot) + CAC_EISA_SLOT_OFFSET, CAC_EISA_IOSIZE, 0, &ioh)) { - printf("can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -174,22 +173,22 @@ cac_eisa_attach(device_t parent, device_ irq = 15; break; default: - printf("controller on invalid IRQ\n"); + aprint_error(": controller on invalid IRQ\n"); return; } if (eisa_intr_map(ec, irq, &ih)) { - printf("can't map interrupt (%d)\n", irq); + aprint_error(": can't map interrupt (%d)\n", irq); return; } intrstr = eisa_intr_string(ec, ih, intrbuf, sizeof(intrbuf)); if ((sc->sc_ih = eisa_intr_establish(ec, ih, IST_LEVEL, IPL_BIO, cac_intr, sc)) == NULL) { - printf("can't establish interrupt"); + aprint_error(": can't establish interrupt"); if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); + aprint_normal(" at %s", intrstr); + aprint_normal("\n"); return; } @@ -200,7 +199,7 @@ cac_eisa_attach(device_t parent, device_ if (strcmp(ea->ea_idstring, cac_eisa_type[i].ct_prodstr) == 0) break; - printf(": Compaq %s\n", cac_eisa_type[i].ct_typestr); + aprint_normal(": Compaq %s\n", cac_eisa_type[i].ct_typestr); memcpy(&sc->sc_cl, cac_eisa_type[i].ct_linkage, sizeof(sc->sc_cl)); cac_init(sc, intrstr, 0); } Index: src/sys/dev/eisa/if_fea.c diff -u src/sys/dev/eisa/if_fea.c:1.46 src/sys/dev/eisa/if_fea.c:1.47 --- src/sys/dev/eisa/if_fea.c:1.46 Sat Mar 29 19:28:24 2014 +++ src/sys/dev/eisa/if_fea.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fea.c,v 1.46 2014/03/29 19:28:24 christos Exp $ */ +/* $NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas <m...@3am-software.com> @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.46 2014/03/29 19:28:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $"); #include "opt_inet.h" @@ -523,9 +523,9 @@ pdq_eisa_attach( if (sc->sc_ats == NULL) aprint_error_dev(self, "warning: couldn't establish shutdown hook\n"); if (sc->sc_csr_memmapped) - printf("%s: using iomem 0x%x-0x%x\n", device_xname(sc->sc_dev), maddr, maddr + msiz - 1); + aprint_normal_dev(self, "using iomem 0x%x-0x%x\n", maddr, maddr + msiz - 1); if (intrstr != NULL) - printf("%s: interrupting at %s\n", device_xname(sc->sc_dev), intrstr); + aprint_normal_dev(self, "interrupting at %s\n", intrstr); } CFATTACH_DECL_NEW(fea, sizeof(pdq_softc_t), Index: src/sys/dev/eisa/mlx_eisa.c diff -u src/sys/dev/eisa/mlx_eisa.c:1.24 src/sys/dev/eisa/mlx_eisa.c:1.25 --- src/sys/dev/eisa/mlx_eisa.c:1.24 Sat Mar 29 19:28:24 2014 +++ src/sys/dev/eisa/mlx_eisa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_eisa.c,v 1.24 2014/03/29 19:28:24 christos Exp $ */ +/* $NetBSD: mlx_eisa.c,v 1.25 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.24 2014/03/29 19:28:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.25 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -127,7 +127,7 @@ mlx_eisa_attach(device_t parent, device_ if (bus_space_map(iot, EISA_SLOT_ADDR(ea->ea_slot) + MLX_EISA_SLOT_OFFSET, MLX_EISA_IOSIZE, 0, &ioh)) { - printf("can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -155,12 +155,12 @@ mlx_eisa_attach(device_t parent, device_ irq = 15; break; default: - printf("controller on invalid IRQ\n"); + aprint_error(": controller on invalid IRQ\n"); return; } if (eisa_intr_map(ec, irq, &ih)) { - printf("can't map interrupt (%d)\n", irq); + aprint_error(": can't map interrupt (%d)\n", irq); return; } @@ -169,10 +169,10 @@ mlx_eisa_attach(device_t parent, device_ ((icfg & 0x08) != 0 ? IST_LEVEL : IST_EDGE), IPL_BIO, mlx_intr, mlx); if (mlx->mlx_ih == NULL) { - printf("can't establish interrupt"); + aprint_error(": can't establish interrupt"); if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); + aprint_normal(" at %s", intrstr); + aprint_normal("\n"); return; } @@ -191,7 +191,7 @@ mlx_eisa_attach(device_t parent, device_ mlx->mlx_reset = mlx_v1_reset; #endif - printf(": Mylex RAID\n"); + aprint_normal(": Mylex RAID\n"); mlx_init(mlx, intrstr); } Index: src/sys/dev/ic/i82586.c diff -u src/sys/dev/ic/i82586.c:1.73 src/sys/dev/ic/i82586.c:1.74 --- src/sys/dev/ic/i82586.c:1.73 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/ic/i82586.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: i82586.c,v 1.73 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: i82586.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -137,7 +137,7 @@ Mode of operation: */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.73 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> @@ -273,7 +273,7 @@ i82586_attach(struct ie_softc *sc, const if_attach(ifp); ether_ifattach(ifp, etheraddr); - printf(" address %s, type %s\n", ether_sprintf(etheraddr), name); + aprint_normal(" address %s, type %s\n", ether_sprintf(etheraddr),name); } @@ -1716,9 +1716,7 @@ i82586_start_transceiver(struct ie_softc } void -i82586_stop( - struct ifnet *ifp, - int disable) +i82586_stop(struct ifnet *ifp, int disable) { struct ie_softc *sc = ifp->if_softc; Index: src/sys/dev/ic/interwave.c diff -u src/sys/dev/ic/interwave.c:1.38 src/sys/dev/ic/interwave.c:1.39 --- src/sys/dev/ic/interwave.c:1.38 Fri Nov 8 03:12:17 2013 +++ src/sys/dev/ic/interwave.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $ */ +/* $NetBSD: interwave.c,v 1.39 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1997, 1999, 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.38 2013/11/08 03:12:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interwave.c,v 1.39 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -194,6 +194,7 @@ iwattach(struct iw_softc *sc) mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO); + aprint_naive("\n"); /* * We can only use a few selected irqs, see if we got one from pnp * code that suits us. @@ -205,16 +206,16 @@ iwattach(struct iw_softc *sc) got_irq = 1; } if (!got_irq) { - printf("\niwattach: couldn't get a suitable irq\n"); + aprint_error("\niwattach: couldn't get a suitable irq\n"); mutex_destroy(&sc->sc_lock); mutex_destroy(&sc->sc_intr_lock); return; } - printf("\n"); + aprint_normal("\n"); iwreset(sc, 0); iw_set_format(sc, AUDIO_ENCODING_ULAW, 0); iw_set_format(sc, AUDIO_ENCODING_ULAW, 1); - printf("%s: interwave version %s\n", + aprint_normal("%s: interwave version %s\n", device_xname(sc->sc_dev), iw_device.version); audio_attach_mi(sc->iw_hw_if, sc, sc->sc_dev); } @@ -1265,8 +1266,10 @@ iw_set_port(void *addr, mixer_ctrl_t *cp case IW_RECORD_SOURCE: error = 0; sc->sc_recsrcbits = cp->un.ord << 6; - DPRINTF(("record source %d bits %x\n", cp->un.ord, sc->sc_recsrcbits)); - iw_mixer_line_level(sc, IW_REC, sc->sc_rec.voll, sc->sc_rec.volr); + DPRINTF(("record source %d bits %x\n", cp->un.ord, + sc->sc_recsrcbits)); + iw_mixer_line_level(sc, IW_REC, sc->sc_rec.voll, + sc->sc_rec.volr); break; } Index: src/sys/dev/ic/mlx.c diff -u src/sys/dev/ic/mlx.c:1.63 src/sys/dev/ic/mlx.c:1.64 --- src/sys/dev/ic/mlx.c:1.63 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/ic/mlx.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx.c,v 1.63 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: mlx.c,v 1.64 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.63 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.64 2016/07/14 10:19:06 msaitoh Exp $"); #include "ld.h" @@ -508,7 +508,8 @@ mlx_init(struct mlx_softc *mlx, const ch rv = kthread_create(PRI_NONE, 0, NULL, mlx_periodic_thread, NULL, &mlx_periodic_lwp, "mlxtask"); if (rv != 0) - printf("mlx_init: unable to create thread (%d)\n", rv); + aprint_error_dev(mlx->mlx_dv, + "mlx_init: unable to create thread (%d)\n", rv); } } @@ -713,8 +714,7 @@ mlxopen(dev_t dev, int flag, int mode, s * Accept the last close on the control device. */ int -mlxclose(dev_t dev, int flag, int mode, - struct lwp *l) +mlxclose(dev_t dev, int flag, int mode, struct lwp *l) { struct mlx_softc *mlx; @@ -727,8 +727,7 @@ mlxclose(dev_t dev, int flag, int mode, * Handle control operations. */ int -mlxioctl(dev_t dev, u_long cmd, void *data, int flag, - struct lwp *l) +mlxioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct mlx_softc *mlx; struct mlx_rebuild_request *rb; Index: src/sys/dev/ic/opl.c diff -u src/sys/dev/ic/opl.c:1.41 src/sys/dev/ic/opl.c:1.42 --- src/sys/dev/ic/opl.c:1.41 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/ic/opl.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: opl.c,v 1.41 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: opl.c,v 1.42 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.41 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.42 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -149,7 +149,7 @@ opl_attach(struct opl_softc *sc) i = opl_find(sc); mutex_exit(sc->lock); if (i == 0) { - printf("\nopl: find failed\n"); + aprint_error("\nopl: find failed\n"); return; } @@ -342,7 +342,7 @@ opl_get_block_fnum(midipitch_t mp) midihz18_t hz18; uint32_t block; uint32_t f_num; - + /* * We can get to about note 30 before needing to switch from block 0. * Thereafter, switch block every octave; that will keep f_num in the @@ -355,10 +355,10 @@ opl_get_block_fnum(midipitch_t mp) /* * Could subtract block*MIDIPITCH_OCTAVE here, or >>block later. Later. */ - + hz18 = MIDIPITCH_TO_HZ18(mp); hz18 >>= block; - + /* * The formula in the manual is f_num = ((hz<<19)/fs)>>(block-1) (though * block==0 implies >>-1 which is a C unspecified result). As we already @@ -369,8 +369,8 @@ opl_get_block_fnum(midipitch_t mp) * continued fraction matches 4/fs to 9+ significant figures. Doing the * shift first (above) ensures there's room in hz18 to multiply by 9. */ - - f_num = (9 * hz18) / 111875; + + f_num = (9 * hz18) / 111875; return ((block << 10) | f_num); } @@ -462,7 +462,7 @@ int opl_calc_vol(int regbyte, int16_t level_cB) { int level = regbyte & OPL_TOTAL_LEVEL_MASK; - + /* * level is a six-bit attenuation, from 0 (full output) * to -48dB (but without the minus sign) in steps of .75 dB. @@ -569,7 +569,7 @@ oplsyn_setv(midisyn *ms, opl_set_op_reg(sc, OPL_KSL_LEVEL, voice, 0, r40m); opl_set_op_reg(sc, OPL_KSL_LEVEL, voice, 1, r40c); } - + if ( act & OPLACT_PITCH ) { mult = 1; if ( mp > MIDIPITCH_FROM_KEY(114) ) { /* out of mult 1 range */ @@ -638,12 +638,12 @@ oplsyn_ctlnotice(midisyn *ms, { DPRINTFN(1, ("%s: %p %d\n", __func__, ms->data, chan)); - + switch (evt) { case MIDICTL_RESET: oplsyn_panhandler(ms, chan); return 1; - + case MIDICTL_CTLR: switch (key) { case MIDI_CTRL_PAN_MSB: @@ -668,8 +668,7 @@ oplsyn_programchange(midisyn *ms, uint_f } void -oplsyn_loadpatch(midisyn *ms, struct sysex_info *sysex, - struct uio *uio) +oplsyn_loadpatch(midisyn *ms, struct sysex_info *sysex, struct uio *uio) { #if 0 struct opl_softc *sc = ms->data; @@ -690,7 +689,7 @@ oplsyn_panhandler(midisyn *ms, uint_fast { struct opl_softc *sc = ms->data; uint_fast16_t setting; - + setting = midictl_read(&ms->ctl, chan, MIDI_CTRL_PAN_MSB, 8192); setting >>= 7; /* we used to treat it as MSB only */ sc->pan[chan] = Index: src/sys/dev/ic/pckbc.c diff -u src/sys/dev/ic/pckbc.c:1.58 src/sys/dev/ic/pckbc.c:1.59 --- src/sys/dev/ic/pckbc.c:1.58 Mon Apr 13 16:33:24 2015 +++ src/sys/dev/ic/pckbc.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc.c,v 1.58 2015/04/13 16:33:24 riastradh Exp $ */ +/* $NetBSD: pckbc.c,v 1.59 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2004 Ben Harris. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.58 2015/04/13 16:33:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.59 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -298,7 +298,7 @@ pckbc_attach(struct pckbc_softc *sc) /* set initial cmd byte */ if (!pckbc_put8042cmd(t)) { - printf("pckbc: cmd word write error\n"); + aprint_error("pckbc: cmd word write error\n"); return; } @@ -340,11 +340,11 @@ pckbc_attach(struct pckbc_softc *sc) * (eg UMC880?). */ if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXECHO)) { - printf("pckbc: aux echo error 1\n"); + aprint_error("pckbc: aux echo error 1\n"); goto nomouse; } if (!pckbc_wait_output(iot, ioh_c)) { - printf("pckbc: aux echo error 2\n"); + aprint_error("pckbc: aux echo error 2\n"); goto nomouse; } t->t_haveaux = 1; @@ -386,7 +386,7 @@ nomouse: /* enable needed interrupts */ t->t_cmdbyte |= cmdbits; if (!pckbc_put8042cmd(t)) - printf("pckbc: cmd word write error\n"); + aprint_error("pckbc: cmd word write error\n"); } static void Index: src/sys/dev/ir/cir.c diff -u src/sys/dev/ir/cir.c:1.31 src/sys/dev/ir/cir.c:1.32 --- src/sys/dev/ir/cir.c:1.31 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ir/cir.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cir.c,v 1.31 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: cir.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.31 2014/07/25 08:10:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -106,7 +106,8 @@ cir_attach(device_t parent, device_t sel sc->sc_methods->im_setparams == NULL) panic("%s: missing methods", device_xname(sc->sc_dev)); #endif - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); } int Index: src/sys/dev/isa/dpt_isa.c diff -u src/sys/dev/isa/dpt_isa.c:1.22 src/sys/dev/isa/dpt_isa.c:1.23 --- src/sys/dev/isa/dpt_isa.c:1.22 Sat Oct 27 17:18:24 2012 +++ src/sys/dev/isa/dpt_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dpt_isa.c,v 1.22 2012/10/27 17:18:24 chs Exp $ */ +/* $NetBSD: dpt_isa.c,v 1.23 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Andrew Doran <a...@netbsd.org> @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.22 2012/10/27 17:18:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.23 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -268,11 +268,12 @@ dpt_isa_attach(device_t parent, device_t iot = ia->ia_iot; ic = ia->ia_ic; - printf(": "); + aprint_naive("\n"); + aprint_normal(": "); if ((error = bus_space_map(iot, ia->ia_io[0].ir_addr, DPT_ISA_IOSIZE, 0, &ioh)) != 0) { - printf("can't map i/o space, error = %d\n", error); + aprint_error("can't map i/o space, error = %d\n", error); return; } @@ -281,7 +282,7 @@ dpt_isa_attach(device_t parent, device_t sc->sc_dmat = ia->ia_dmat; if ((error = isa_dmacascade(ic, ia->ia_drq[0].ir_drq)) != 0) { - printf("unable to cascade DRQ, error = %d\n", error); + aprint_error("unable to cascade DRQ, error = %d\n", error); return; } @@ -289,12 +290,12 @@ dpt_isa_attach(device_t parent, device_t sc->sc_ih = isa_intr_establish(ic, ia->ia_irq[0].ir_irq, IST_EDGE, IPL_BIO, dpt_intr, sc); if (sc->sc_ih == NULL) { - printf("can't establish interrupt\n"); + aprint_error("can't establish interrupt\n"); return; } if (dpt_readcfg(sc)) { - printf("readcfg failed - see dpt(4)\n"); + aprint_error("readcfg failed - see dpt(4)\n"); return; } Index: src/sys/dev/isa/mpu_isa.c diff -u src/sys/dev/isa/mpu_isa.c:1.22 src/sys/dev/isa/mpu_isa.c:1.23 --- src/sys/dev/isa/mpu_isa.c:1.22 Thu Nov 24 03:35:58 2011 +++ src/sys/dev/isa/mpu_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mpu_isa.c,v 1.22 2011/11/24 03:35:58 mrg Exp $ */ +/* $NetBSD: mpu_isa.c,v 1.23 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpu_isa.c,v 1.22 2011/11/24 03:35:58 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpu_isa.c,v 1.23 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -106,11 +106,13 @@ mpu_isa_attach(device_t parent, device_t struct mpu_isa_softc *sc = device_private(self); struct isa_attach_args *ia = aux; + aprint_naive("\n"); aprint_normal("\n"); if (bus_space_map(sc->sc_mpu.iot, ia->ia_io[0].ir_addr, MPU401_NPORT, 0, &sc->sc_mpu.ioh)) { - printf("mpu_isa_attach: bus_space_map failed\n"); + aprint_error_dev(self, + "mpu_isa_attach: bus_space_map failed\n"); return; } Index: src/sys/dev/isa/ess.c diff -u src/sys/dev/isa/ess.c:1.82 src/sys/dev/isa/ess.c:1.83 --- src/sys/dev/isa/ess.c:1.82 Sat Aug 16 13:01:33 2014 +++ src/sys/dev/isa/ess.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ess.c,v 1.82 2014/08/16 13:01:33 nakayama Exp $ */ +/* $NetBSD: ess.c,v 1.83 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright 1997 @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.82 2014/08/16 13:01:33 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.83 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -185,7 +185,8 @@ u_char ess_read_mix_reg(struct ess_softc void ess_write_mix_reg(struct ess_softc *, u_char, u_char); void ess_clear_mreg_bits(struct ess_softc *, u_char, u_char); void ess_set_mreg_bits(struct ess_softc *, u_char, u_char); -void ess_read_multi_mix_reg(struct ess_softc *, u_char, u_int8_t *, bus_size_t); +void ess_read_multi_mix_reg(struct ess_softc *, u_char, u_int8_t *, + bus_size_t); static const char *essmodel[] = { "unsupported", @@ -916,7 +917,7 @@ essattach(struct ess_softc *sc, int enab u_int v; if (ess_setup_sc(sc, 0)) { - printf(": setup failed\n"); + aprint_error(": setup failed\n"); return; } @@ -974,7 +975,8 @@ essattach(struct ess_softc *sc, int enab if (isa_dmamap_create(sc->sc_ic, sc->sc_audio2.drq, sc->sc_audio2.maxsize, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW)) { - aprint_error_dev(sc->sc_dev, "can't create map for drq %d\n", + aprint_error_dev(sc->sc_dev, + "can't create map for drq %d\n", sc->sc_audio2.drq); goto fail; } Index: src/sys/dev/isa/i82365_isa.c diff -u src/sys/dev/isa/i82365_isa.c:1.34 src/sys/dev/isa/i82365_isa.c:1.35 --- src/sys/dev/isa/i82365_isa.c:1.34 Sat Oct 27 17:18:24 2012 +++ src/sys/dev/isa/i82365_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: i82365_isa.c,v 1.34 2012/10/27 17:18:24 chs Exp $ */ +/* $NetBSD: i82365_isa.c,v 1.35 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82365_isa.c,v 1.34 2012/10/27 17:18:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82365_isa.c,v 1.35 2016/07/14 10:19:06 msaitoh Exp $"); #define PCICISADEBUG @@ -193,18 +193,19 @@ pcic_isa_attach(device_t parent, device_ bus_space_handle_t ioh; bus_space_handle_t memh; + aprint_naive("\n"); sc->dev = self; /* Map i/o space. */ if (bus_space_map(iot, ia->ia_io[0].ir_addr, PCIC_IOSIZE, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } /* Map mem space. */ if (bus_space_map(memt, ia->ia_iomem[0].ir_addr, ia->ia_iomem[0].ir_size, 0, &memh)) { - printf(": can't map mem space\n"); + aprint_error(": can't map mem space\n"); return; } @@ -224,7 +225,7 @@ pcic_isa_attach(device_t parent, device_ else sc->irq = ISA_UNKNOWN_IRQ; - printf("\n"); + aprint_normal("\n"); pcic_attach(sc); pcic_isa_bus_width_probe(sc, iot, ioh, ia->ia_io[0].ir_addr, Index: src/sys/dev/isa/if_ep_isa.c diff -u src/sys/dev/isa/if_ep_isa.c:1.44 src/sys/dev/isa/if_ep_isa.c:1.45 --- src/sys/dev/isa/if_ep_isa.c:1.44 Sat Mar 14 21:04:20 2009 +++ src/sys/dev/isa/if_ep_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ep_isa.c,v 1.44 2009/03/14 21:04:20 dsl Exp $ */ +/* $NetBSD: if_ep_isa.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ep_isa.c,v 1.44 2009/03/14 21:04:20 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ep_isa.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -362,7 +362,7 @@ ep_isa_attach(device_t parent, device_t /* Map i/o space. */ if (bus_space_map(iot, ia->ia_io[0].ir_addr, 0x10, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -377,14 +377,14 @@ ep_isa_attach(device_t parent, device_t chipset = (int)(long)ia->ia_aux; if ((chipset & 0xfff0) == PROD_ID_3C509) { - printf(": 3Com 3C509 Ethernet\n"); + aprint_normal(": 3Com 3C509 Ethernet\n"); epconfig(sc, ELINK_CHIPSET_3C509, NULL); } else { /* * XXX: Maybe a 3c515, but the check in ep_isa_probe looks * at the moment only for a 3c509. */ - printf(": unknown 3Com Ethernet card: %04x\n", chipset); + aprint_error(": unknown 3Com Ethernet card: %04x\n", chipset); return; } Index: src/sys/dev/isa/if_iy.c diff -u src/sys/dev/isa/if_iy.c:1.96 src/sys/dev/isa/if_iy.c:1.97 --- src/sys/dev/isa/if_iy.c:1.96 Fri Jun 10 13:27:14 2016 +++ src/sys/dev/isa/if_iy.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iy.c,v 1.96 2016/06/10 13:27:14 ozaki-r Exp $ */ +/* $NetBSD: if_iy.c,v 1.97 2016/07/14 10:19:06 msaitoh Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.96 2016/06/10 13:27:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.97 2016/07/14 10:19:06 msaitoh Exp $"); #include "opt_inet.h" @@ -291,7 +291,7 @@ iyattach(device_t parent, device_t self, iot = ia->ia_iot; if (bus_space_map(iot, ia->ia_io[0].ir_addr, 16, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -331,7 +331,7 @@ iyattach(device_t parent, device_t self, (eaddr[EEPPEther2] != eepromread(iot, ioh, EEPPEther2a))) - printf("EEPROM Ethernet address differs from copy\n"); + aprint_error("EEPROM Ethernet address differs from copy\n"); #endif myaddr[1] = eaddr[EEPPEther0] & 0xFF; @@ -350,13 +350,13 @@ iyattach(device_t parent, device_t self, /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp, myaddr); - printf(": address %s, rev. %d, %d kB\n", + aprint_normal(": address %s, rev. %d, %d kB\n", ether_sprintf(myaddr), sc->hard_vers, sc->sram/1024); eirq = eepro_irqmap[eaddr[EEPPW1] & EEPP_Int]; if (eirq != ia->ia_irq[0].ir_irq) - printf("%s: EEPROM irq setting %d ignored\n", + aprint_error("%s: EEPROM irq setting %d ignored\n", device_xname(sc->sc_dev), eirq); sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq, @@ -390,7 +390,7 @@ iystop(struct iy_softc *sc) delay(200); #ifdef IYDEBUG printf("%s: dumping tx chain (st 0x%x end 0x%x last 0x%x)\n", - device_xname(sc->sc_dev), sc->tx_start, sc->tx_end, sc->tx_last); + device_xname(sc->sc_dev), sc->tx_start, sc->tx_end, sc->tx_last); p = sc->tx_last; if (!p) p = sc->tx_start; @@ -404,7 +404,7 @@ iystop(struct iy_softc *sc) printf("0x%04x: %s ", p, sbuf); v = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG)); - snprintb(sbuf, sizeof(sbuf), + snprintb(sbuf, sizeof(sbuf), "\020\6MAX_COL\7HRT_BEAT\010TX_DEF\011UND_RUN" "\012JERR\013LST_CRS\014LTCOL\016TX_OK\020COLL", v); printf("0x%s", sbuf); @@ -475,11 +475,12 @@ iyinit(struct iy_softc *sc) { char sbuf[128]; - snprintb(sbuf, sizeof(sbuf), + snprintb(sbuf, sizeof(sbuf), "\020\1PRMSC\2NOBRDST\3SEECRC\4LENGTH\5NOSaIns\6MultiIA", temp); - - printf("%s: RECV_MODES set to %s\n", device_xname(sc->sc_dev), sbuf); + + printf("%s: RECV_MODES set to %s\n", device_xname(sc->sc_dev), + sbuf); } #endif /* XXX VOODOO */ @@ -498,7 +499,8 @@ iyinit(struct iy_softc *sc) snprintb(sbuf, sizeof(sbuf), "\020\1LnkInDis\2PolCor\3TPE\4JabberDis\5NoAport\6BNC", temp); - printf("%s: media select was 0x%s ", device_xname(sc->sc_dev), sbuf); + printf("%s: media select was 0x%s ", device_xname(sc->sc_dev), + sbuf); } #endif temp = (temp & TEST_MODE_MASK); @@ -555,7 +557,7 @@ iyinit(struct iy_softc *sc) snprintb(sbuf, sizeof(sbuf), "\020\4bad_irq\010flash/boot present", temp); - + printf("%s: int no was %s\n", device_xname(sc->sc_dev), sbuf); temp = bus_space_read_1(iot, ioh, INT_NO_REG); @@ -577,7 +579,7 @@ iyinit(struct iy_softc *sc) snprintb(sbuf, sizeof(sbuf), "\020\2WORD_WIDTH\010INT_ENABLE", temp); - + printf("%s: HW access is %s\n", device_xname(sc->sc_dev), sbuf); } #endif @@ -787,7 +789,8 @@ iystart(struct ifnet *ifp) printf("%s: new last = 0x%x, end = 0x%x.\n", device_xname(sc->sc_dev), last, end); printf("%s: old start = 0x%x, end = 0x%x, last = 0x%x\n", - device_xname(sc->sc_dev), sc->tx_start, sc->tx_end, sc->tx_last); + device_xname(sc->sc_dev), sc->tx_start, sc->tx_end, + sc->tx_last); #endif if (sc->tx_start != sc->tx_end) { @@ -953,7 +956,7 @@ iyintr(void *arg) printf("%s: got interrupt %s", device_xname(sc->sc_dev), sbuf); if (status & EXEC_INT) { - snprintb(sbuf, sizeof(sbuf), + snprintb(sbuf, sizeof(sbuf), "\020\6ABORT", bus_space_read_1(iot, ioh, 0)); printf(" event %s\n", sbuf); } else @@ -981,7 +984,8 @@ iyintr(void *arg) } void -iyget(struct iy_softc *sc, bus_space_tag_t iot, bus_space_handle_t ioh, int rxlen) +iyget(struct iy_softc *sc, bus_space_tag_t iot, bus_space_handle_t ioh, + int rxlen) { struct mbuf *m, *top, **mp; struct ifnet *ifp; @@ -1027,7 +1031,8 @@ iyget(struct iy_softc *sc, bus_space_tag mtod(m, u_int16_t *), len/2); } else { #ifdef IYDEBUG - printf("%s: received odd mbuf\n", device_xname(sc->sc_dev)); + printf("%s: received odd mbuf\n", + device_xname(sc->sc_dev)); #endif *(mtod(m, char *)) = bus_space_read_stream_2(iot, ioh, MEM_PORT_REG); @@ -1086,7 +1091,8 @@ iy_intr_rx(struct iy_softc *sc) "\014CRCERR\015LENERR\016RCVOK\020TYP", rxstatus); printf("%s: pck at 0x%04x stat %s next 0x%x len 0x%x\n", - device_xname(sc->sc_dev), rxadrs, sbuf, rxnext, rxlen); + device_xname(sc->sc_dev), rxadrs, sbuf, rxnext, + rxlen); } #else __USE(rxstatus); @@ -1365,8 +1371,8 @@ iy_mc_setup(struct iy_softc *sc) bus_space_write_1(iot, ioh, STATUS_REG, EXEC_INT); #ifdef DIAGNOSTIC if (temp & 0x20) { - aprint_error_dev(sc->sc_dev, "mc setup failed, %d usec\n", - timeout * 2); + aprint_error_dev(sc->sc_dev, + "mc setup failed, %d usec\n", timeout * 2); } else if (((temp & 0x0f) == 0x03) && (ifp->if_flags & IFF_DEBUG)) { printf("%s: mc setup done, %d usec\n", @@ -1534,7 +1540,8 @@ iyprobemem(struct iy_softc *sc) } static int -eepromreadall(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t *wordp, int maxi) +eepromreadall(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t *wordp, + int maxi) { int i; u_int16_t checksum, tmp; Index: src/sys/dev/isa/if_ntwoc_isa.c diff -u src/sys/dev/isa/if_ntwoc_isa.c:1.26 src/sys/dev/isa/if_ntwoc_isa.c:1.27 --- src/sys/dev/isa/if_ntwoc_isa.c:1.26 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/isa/if_ntwoc_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ntwoc_isa.c,v 1.26 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: if_ntwoc_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1999 Christian E. Hopps * Copyright (c) 1996 John Hay. @@ -29,11 +29,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ntwoc_isa.c,v 1.26 2016/07/11 11:31:50 msaitoh Exp $ + * $Id: if_ntwoc_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_isa.c,v 1.26 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -569,8 +569,9 @@ ntwoc_isa_attach(device_t parent, device /* make sure we have 2 pages for each port */ if (pgs < 2 * sca->sc_numports) { - printf("%s: %d less than required pages of memory of %d\n", - device_xname(sc->sc_dev), pgs, 2 * sca->sc_numports); + aprint_error_dev(self, + "%d less than required pages of memory of %d\n", + pgs, 2 * sca->sc_numports); return; } Index: src/sys/dev/isa/tcic2_isa.c diff -u src/sys/dev/isa/tcic2_isa.c:1.26 src/sys/dev/isa/tcic2_isa.c:1.27 --- src/sys/dev/isa/tcic2_isa.c:1.26 Sat Oct 27 17:18:25 2012 +++ src/sys/dev/isa/tcic2_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: tcic2_isa.c,v 1.26 2012/10/27 17:18:25 chs Exp $ */ +/* $NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $ */ /* * @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.26 2012/10/27 17:18:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -224,16 +224,18 @@ tcic_isa_attach(device_t parent, device_ bus_space_handle_t ioh; bus_space_handle_t memh; + aprint_naive("\n"); + /* Map i/o space. */ if (bus_space_map(iot, ia->ia_io[0].ir_addr, TCIC_IOSIZE, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } /* Map mem space. */ if (bus_space_map(memt, ia->ia_iomem[0].ir_addr, ia->ia_iomem[0].ir_size, 0, &memh)) { - printf(": can't map mem space\n"); + aprint_error(": can't map mem space\n"); return; } @@ -274,9 +276,9 @@ tcic_isa_attach(device_t parent, device_ aprint_error_dev(self, "can't allocate interrupt\n"); return; } - printf(": using irq %d", sc->irq); + aprint_normal(": using irq %d", sc->irq); } - printf("\n"); + aprint_normal("\n"); tcic_attach(sc); @@ -321,13 +323,13 @@ tcic_isa_attach(device_t parent, device_ sc->iosize = tcic_isa_alloc_iosize; DPRINTF(("%s: bus_space_alloc range 0x%04lx-0x%04lx " - "(config override)\n", device_xname(self), (long) sc->iobase, - (long) sc->iobase + sc->iosize)); + "(config override)\n", device_xname(self), + (long)sc->iobase, (long)sc->iobase + sc->iosize)); } sc->ih = isa_intr_establish(ic, sc->irq, IST_EDGE, IPL_TTY, tcic_intr, sc); if (sc->ih == NULL) { - printf("%s: can't establish interrupt\n", device_xname(self)); + aprint_error_dev(self, "can't establish interrupt\n"); return; } @@ -335,14 +337,15 @@ tcic_isa_attach(device_t parent, device_ } void * -tcic_isa_chip_intr_establish(pcmcia_chipset_handle_t pch, struct pcmcia_function *pf, - int ipl, int (*fct)(void *), void *arg) +tcic_isa_chip_intr_establish(pcmcia_chipset_handle_t pch, + struct pcmcia_function *pf, int ipl, int (*fct)(void *), void *arg) { struct tcic_handle *h = (struct tcic_handle *) pch; int irq, ist; void *ih; - DPRINTF(("%s: tcic_isa_chip_intr_establish\n", device_xname(h->sc->sc_dev))); + DPRINTF(("%s: tcic_isa_chip_intr_establish\n", + device_xname(h->sc->sc_dev))); /* XXX should we convert level to pulse? -chb */ if (pf->cfe->flags & PCMCIA_CFE_IRQLEVEL) @@ -374,7 +377,8 @@ tcic_isa_chip_intr_disestablish(pcmcia_c struct tcic_handle *h = (struct tcic_handle *) pch; int val, reg; - DPRINTF(("%s: tcic_isa_chip_intr_disestablish\n", device_xname(h->sc->sc_dev))); + DPRINTF(("%s: tcic_isa_chip_intr_disestablish\n", + device_xname(h->sc->sc_dev))); h->ih_irq = 0; Index: src/sys/dev/isa/if_tr_isa.c diff -u src/sys/dev/isa/if_tr_isa.c:1.25 src/sys/dev/isa/if_tr_isa.c:1.26 --- src/sys/dev/isa/if_tr_isa.c:1.25 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/isa/if_tr_isa.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tr_isa.c,v 1.25 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: if_tr_isa.c,v 1.26 2016/07/14 10:19:06 msaitoh Exp $ */ /* XXXJRT changes isa_attach_args too early!! */ @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tr_isa.c,v 1.25 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tr_isa.c,v 1.26 2016/07/14 10:19:06 msaitoh Exp $"); #undef TRISADEBUG @@ -205,12 +205,12 @@ tr_isa_attach(device_t parent, device_t sc->sc_piot = ia->ia_iot; sc->sc_memt = ia->ia_memt; if (tr_isa_map_io(ia, &sc->sc_pioh, &sc->sc_mmioh)) { - printf("tr_isa_attach: IO space vanished\n"); + aprint_error("tr_isa_attach: IO space vanished\n"); return; } if (bus_space_map(sc->sc_memt, ia->ia_iomem[0].ir_addr, ia->ia_iomem[0].ir_size, 0, &sc->sc_sramh)) { - printf("tr_isa_attach: shared ram space vanished\n"); + aprint_error("tr_isa_attach: shared ram space vanished\n"); return; } /* set ACA offset */ Index: src/sys/dev/isa/isic_isa.c diff -u src/sys/dev/isa/isic_isa.c:1.37 src/sys/dev/isa/isic_isa.c:1.38 --- src/sys/dev/isa/isic_isa.c:1.37 Sun Mar 23 02:46:55 2014 +++ src/sys/dev/isa/isic_isa.c Thu Jul 14 10:19:06 2016 @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa.c,v 1.37 2014/03/23 02:46:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa.c,v 1.38 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -917,7 +917,8 @@ isic_isa_attach(device_t parent, device_ setup_io_map(flags, ia->ia_iot, ia->ia_memt, iobase, maddr, &(sc->sc_num_mappings), &(sc->sc_maps[0]), NULL, NULL); } else { - printf(": could not determine card type - not configured!\n"); + aprint_error(": could not determine card type " + "- not configured!\n"); return; } break; Index: src/sys/dev/isa/mcd.c diff -u src/sys/dev/isa/mcd.c:1.115 src/sys/dev/isa/mcd.c:1.116 --- src/sys/dev/isa/mcd.c:1.115 Sun Apr 26 15:15:20 2015 +++ src/sys/dev/isa/mcd.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mcd.c,v 1.115 2015/04/26 15:15:20 mlelstv Exp $ */ +/* $NetBSD: mcd.c,v 1.116 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved. @@ -56,7 +56,7 @@ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.115 2015/04/26 15:15:20 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.116 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -262,9 +262,11 @@ mcdattach(device_t parent, device_t self bus_space_handle_t ioh; struct mcd_mbox mbx; + aprint_naive("\n"); + /* Map i/o space */ if (bus_space_map(iot, ia->ia_io[0].ir_addr, MCD_NPORT, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -277,7 +279,7 @@ mcdattach(device_t parent, device_t self sc->debug = 0; if (!mcd_find(iot, ioh, sc)) { - printf(": mcd_find failed\n"); + aprint_error(": mcd_find failed\n"); return; } @@ -290,7 +292,7 @@ mcdattach(device_t parent, device_t self disk_init(&sc->sc_dk, device_xname(sc->sc_dev), &mcddkdriver); disk_attach(&sc->sc_dk); - printf(": model %s\n", sc->type != 0 ? sc->type : "unknown"); + aprint_normal(": model %s\n", sc->type != 0 ? sc->type : "unknown"); (void) mcd_setlock(sc, MCD_LK_UNLOCK); @@ -410,7 +412,7 @@ mcdclose(dev_t dev, int flag, int fmt, s { struct mcd_softc *sc = device_lookup_private(&mcd_cd, MCDUNIT(dev)); int part = MCDPART(dev); - + MCD_TRACE("close: partition=%d\n", part); mutex_enter(&sc->sc_lock); @@ -575,7 +577,7 @@ mcdioctl(dev_t dev, u_long cmd, void *ad #ifdef __HAVE_OLD_DISKLABEL struct disklabel newlabel; #endif - + MCD_TRACE("ioctl: cmd=0x%lx\n", cmd); if ((sc->flags & MCDF_LOADED) == 0) @@ -1005,7 +1007,8 @@ mcd_getresult(struct mcd_softc *sc, stru if (sc->debug) printf(" timeout\n"); else if (!sc->probe) - printf("%s: timeout in getresult\n", device_xname(sc->sc_dev)); + printf("%s: timeout in getresult\n", + device_xname(sc->sc_dev)); return EIO; } if (sc->debug) @@ -1021,7 +1024,8 @@ mcd_getresult(struct mcd_softc *sc, stru if (sc->debug) printf(" timeout\n"); else - printf("%s: timeout in getresult\n", device_xname(sc->sc_dev)); + printf("%s: timeout in getresult\n", + device_xname(sc->sc_dev)); return EIO; } if (sc->debug) @@ -1088,7 +1092,8 @@ mcd_send(struct mcd_softc *sc, struct mc for (retry = MCD_RETRIES; retry; retry--) { bus_space_write_1(iot, ioh, MCD_COMMAND, mbx->cmd.opcode); for (i = 0; i < mbx->cmd.length; i++) - bus_space_write_1(iot, ioh, MCD_COMMAND, mbx->cmd.data.raw.data[i]); + bus_space_write_1(iot, ioh, MCD_COMMAND, + mbx->cmd.data.raw.data[i]); if ((error = mcd_getresult(sc, &mbx->res)) == 0) break; if (error == EINVAL) @@ -1207,7 +1212,7 @@ mcdintr(void *arg) sc->lastmode = mbx->mode; firstblock: - MCD_TRACE("doread: read blkno=%d for bp=0x%p\n", + MCD_TRACE("doread: read blkno=%d for bp=0x%p\n", (int) mbx->blkno, bp); /* Build parameter block. */ @@ -1459,7 +1464,8 @@ mcd_read_toc(struct mcd_softc *sc) } int -mcd_toc_entries(struct mcd_softc *sc, struct ioc_read_toc_entry *te, struct cd_toc_entry *entries, int *count) +mcd_toc_entries(struct mcd_softc *sc, struct ioc_read_toc_entry *te, + struct cd_toc_entry *entries, int *count) { int len = te->data_len; struct ioc_toc_header header; @@ -1568,7 +1574,8 @@ mcd_getqchan(struct mcd_softc *sc, union } int -mcd_read_subchannel(struct mcd_softc *sc, struct ioc_read_subchannel *ch, struct cd_sub_channel_info *info) +mcd_read_subchannel(struct mcd_softc *sc, struct ioc_read_subchannel *ch, + struct cd_sub_channel_info *info) { int len = ch->data_len; union mcd_qchninfo q; Index: src/sys/dev/isa/rtfps.c diff -u src/sys/dev/isa/rtfps.c:1.59 src/sys/dev/isa/rtfps.c:1.60 --- src/sys/dev/isa/rtfps.c:1.59 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/isa/rtfps.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rtfps.c,v 1.59 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: rtfps.c,v 1.60 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtfps.c,v 1.59 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtfps.c,v 1.60 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -151,14 +151,15 @@ rtfpsattach(device_t parent, device_t se bus_space_tag_t iot = ia->ia_iot; int i, iobase, irq; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); sc->sc_iot = ia->ia_iot; sc->sc_iobase = ia->ia_io[0].ir_addr; irq = ia->ia_irq[0].ir_irq; if (irq >= 16 || irqport[irq] == -1) { - printf("%s: invalid irq\n", device_xname(self)); + aprint_error_dev(self, "invalid irq\n"); return; } sc->sc_irqport = irqport[irq]; Index: src/sys/dev/isa/seagate.c diff -u src/sys/dev/isa/seagate.c:1.73 src/sys/dev/isa/seagate.c:1.74 --- src/sys/dev/isa/seagate.c:1.73 Sat Sep 12 19:31:41 2015 +++ src/sys/dev/isa/seagate.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: seagate.c,v 1.73 2015/09/12 19:31:41 christos Exp $ */ +/* $NetBSD: seagate.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $ */ /* * ST01/02, Future Domain TMC-885, TMC-950 SCSI driver @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.73 2015/09/12 19:31:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -391,6 +391,7 @@ seaattach(device_t parent, device_t self struct scsipi_channel *chan = &sea->sc_channel; int i; + aprint_naive("\n"); sea->sc_dev = self; /* XXX XXX XXX */ @@ -462,7 +463,7 @@ seaattach(device_t parent, device_t self chan->chan_id = sea->our_id; chan->chan_flags = SCSIPI_CHAN_CANGROW; - printf("\n"); + aprint_normal("\n"); sea->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq, IST_EDGE, IPL_BIO, seaintr, sea); @@ -554,7 +555,8 @@ sea_init(struct sea_softc *sea) * the unit, target and lu. */ void -sea_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg) +sea_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, + void *arg) { struct scsipi_xfer *xs; struct scsipi_periph *periph __diagused; Index: src/sys/dev/isa/spkr.c diff -u src/sys/dev/isa/spkr.c:1.36 src/sys/dev/isa/spkr.c:1.37 --- src/sys/dev/isa/spkr.c:1.36 Sun May 17 05:20:37 2015 +++ src/sys/dev/isa/spkr.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.36 2015/05/17 05:20:37 pgoyette Exp $ */ +/* $NetBSD: spkr.c,v 1.37 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.36 2015/05/17 05:20:37 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.37 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -427,11 +427,12 @@ spkrprobe(device_t parent, cfdata_t matc void spkrattach(device_t parent, device_t self, void *aux) { - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); ppicookie = ((struct pcppi_attach_args *)aux)->pa_cookie; spkr_attached = 1; if (!pmf_device_register(self, NULL, NULL)) - aprint_error_dev(self, "couldn't establish power handler\n"); + aprint_error_dev(self, "couldn't establish power handler\n"); } int Index: src/sys/dev/isa/wt.c diff -u src/sys/dev/isa/wt.c:1.87 src/sys/dev/isa/wt.c:1.88 --- src/sys/dev/isa/wt.c:1.87 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/isa/wt.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wt.c,v 1.87 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: wt.c,v 1.88 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Streamer tape driver. @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wt.c,v 1.87 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wt.c,v 1.88 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -286,7 +286,7 @@ wtattach(device_t parent, device_t self, /* Map i/o space */ if (bus_space_map(iot, ia->ia_io[0].ir_addr, AV_NPORT, 0, &ioh)) { - printf(": can't map i/o space\n"); + aprint_error(": can't map i/o space\n"); return; } @@ -300,7 +300,7 @@ wtattach(device_t parent, device_t self, if (wtreset(iot, ioh, &wtregs)) { sc->type = WANGTEK; memcpy(&sc->regs, &wtregs, sizeof(sc->regs)); - printf(": type <Wangtek>\n"); + aprint_normal(": type <Wangtek>\n"); goto ok; } @@ -308,7 +308,7 @@ wtattach(device_t parent, device_t self, if (wtreset(iot, ioh, &avregs)) { sc->type = ARCHIVE; memcpy(&sc->regs, &avregs, sizeof(sc->regs)); - printf(": type <Archive>\n"); + aprint_normal(": type <Archive>\n"); /* Reset DMA. */ bus_space_write_1(iot, ioh, sc->regs.RDMAPORT, 0); goto ok; Index: src/sys/dev/isapnp/aha_isapnp.c diff -u src/sys/dev/isapnp/aha_isapnp.c:1.19 src/sys/dev/isapnp/aha_isapnp.c:1.20 --- src/sys/dev/isapnp/aha_isapnp.c:1.19 Tue Sep 22 13:22:53 2009 +++ src/sys/dev/isapnp/aha_isapnp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: aha_isapnp.c,v 1.19 2009/09/22 13:22:53 tsutsui Exp $ */ +/* $NetBSD: aha_isapnp.c,v 1.20 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aha_isapnp.c,v 1.19 2009/09/22 13:22:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha_isapnp.c,v 1.20 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -97,13 +97,13 @@ aha_isapnp_attach(device_t parent, devic if (ipa->ipa_ndrq == 0) { if (apd.sc_drq != -1) { - printf("%s: no PnP drq, but card has one\n", - device_xname(self)); + aprint_error_dev(self, + "no PnP drq, but card has one\n"); return; } } else if (apd.sc_drq != ipa->ipa_drq[0].num) { - printf("%s: card drq # (%d) != PnP # (%d)\n", - device_xname(self), apd.sc_drq, ipa->ipa_drq[0].num); + aprint_error_dev(self, "card drq # (%d) != PnP # (%d)\n", + apd.sc_drq, ipa->ipa_drq[0].num); return; } else { int error = isa_dmacascade(ipa->ipa_ic, ipa->ipa_drq[0].num); @@ -115,8 +115,8 @@ aha_isapnp_attach(device_t parent, devic } if (apd.sc_irq != ipa->ipa_irq[0].num) { - printf("%s: card irq # (%d) != PnP # (%d)\n", - device_xname(self), apd.sc_irq, ipa->ipa_irq[0].num); + aprint_error_dev(self, "card irq # (%d) != PnP # (%d)\n", + apd.sc_irq, ipa->ipa_irq[0].num); return; } Index: src/sys/dev/isapnp/gus_isapnp.c diff -u src/sys/dev/isapnp/gus_isapnp.c:1.37 src/sys/dev/isapnp/gus_isapnp.c:1.38 --- src/sys/dev/isapnp/gus_isapnp.c:1.37 Sat Oct 27 17:18:26 2012 +++ src/sys/dev/isapnp/gus_isapnp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: gus_isapnp.c,v 1.37 2012/10/27 17:18:26 chs Exp $ */ +/* $NetBSD: gus_isapnp.c,v 1.38 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1997, 1999, 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.37 2012/10/27 17:18:26 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.38 2016/07/14 10:19:06 msaitoh Exp $"); #include "guspnp.h" #if NGUSPNP > 0 @@ -134,7 +134,8 @@ gus_isapnp_attach(device_t parent, devic sc = device_private(self); ipa = aux; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); if (!gus_0) return; @@ -206,8 +207,7 @@ gus_isapnp_attach(device_t parent, devic sc->iw_cd = &guspnp_cd; sc->iw_hw_if = &guspnp_hw_if; - printf("%s: %s %s", device_xname(self), ipa->ipa_devident, - ipa->ipa_devclass); + aprint_normal_dev(self, "%s %s", ipa->ipa_devident, ipa->ipa_devclass); iwattach(sc); } Index: src/sys/dev/isapnp/i82365_isapnp.c diff -u src/sys/dev/isapnp/i82365_isapnp.c:1.32 src/sys/dev/isapnp/i82365_isapnp.c:1.33 --- src/sys/dev/isapnp/i82365_isapnp.c:1.32 Sat Oct 27 17:18:26 2012 +++ src/sys/dev/isapnp/i82365_isapnp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: i82365_isapnp.c,v 1.32 2012/10/27 17:18:26 chs Exp $ */ +/* $NetBSD: i82365_isapnp.c,v 1.33 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1998 Bill Sommerfeld. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.32 2012/10/27 17:18:26 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.33 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,15 +119,15 @@ pcic_isapnp_attach(device_t parent, devi sc->dev = self; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); if (isapnp_config(iot, memt, ipa)) { aprint_error_dev(self, "error in region allocation\n"); return; } - printf("%s: %s %s", device_xname(self), ipa->ipa_devident, - ipa->ipa_devclass); + aprint_normal_dev(self, "%s %s", ipa->ipa_devident, ipa->ipa_devclass); /* sanity check that we get at least one hunk of IO space.. */ if (ipa->ipa_nio < 1) { @@ -142,20 +142,20 @@ pcic_isapnp_attach(device_t parent, devi /* sanity check to make sure we have a real PCIC there.. */ bus_space_write_1(iot, ioh, PCIC_REG_INDEX, C0SA + PCIC_IDENT); tmp1 = bus_space_read_1(iot, ioh, PCIC_REG_DATA); - printf("(ident 0x%x", tmp1); + aprint_normal("(ident 0x%x", tmp1); if (pcic_ident_ok(tmp1)) { - printf(" OK)"); + aprint_normal(" OK)"); } else { - printf(" Not OK)\n"); + aprint_error(" Not OK)\n"); return; } msize = 0x4000; if (isa_mem_alloc(memt, msize, msize, 0, 0, &maddr, &memh)) { - printf(": can't alloc mem space\n"); + aprint_error(": can't alloc mem space\n"); return; } - printf(": using iomem %#" PRIxPADDR " iosiz %#x", maddr, msize); + aprint_normal(": using iomem %#" PRIxPADDR " iosiz %#x", maddr, msize); sc->membase = maddr; sc->subregionmask = (1 << (msize / PCIC_MEM_PAGESIZE)) - 1; @@ -178,7 +178,7 @@ pcic_isapnp_attach(device_t parent, devi else sc->irq = -1; - printf("\n"); + aprint_normal("\n"); pcic_attach(sc); pcic_isa_bus_width_probe(sc, iot, ioh, ipa->ipa_io[0].base, Index: src/sys/dev/isapnp/if_ep_isapnp.c diff -u src/sys/dev/isapnp/if_ep_isapnp.c:1.34 src/sys/dev/isapnp/if_ep_isapnp.c:1.35 --- src/sys/dev/isapnp/if_ep_isapnp.c:1.34 Wed Aug 27 05:33:47 2008 +++ src/sys/dev/isapnp/if_ep_isapnp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ep_isapnp.c,v 1.34 2008/08/27 05:33:47 christos Exp $ */ +/* $NetBSD: if_ep_isapnp.c,v 1.35 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1997 Jonathan Stone <jonat...@netbsd.org> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ep_isapnp.c,v 1.34 2008/08/27 05:33:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ep_isapnp.c,v 1.35 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -87,7 +87,8 @@ ep_isapnp_attach(device_t parent, device struct isapnp_attach_args *ipa = aux; int chipset; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); sc->sc_dev = self; if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) { @@ -95,8 +96,7 @@ ep_isapnp_attach(device_t parent, device return; } - printf("%s: %s %s\n", device_xname(sc->sc_dev), ipa->ipa_devident, - ipa->ipa_devclass); + aprint_normal("%s %s\n", ipa->ipa_devident, ipa->ipa_devclass); sc->sc_iot = ipa->ipa_iot; sc->sc_ioh = ipa->ipa_io[0].h; Index: src/sys/dev/isapnp/if_tr_isapnp.c diff -u src/sys/dev/isapnp/if_tr_isapnp.c:1.21 src/sys/dev/isapnp/if_tr_isapnp.c:1.22 --- src/sys/dev/isapnp/if_tr_isapnp.c:1.21 Sat Oct 27 17:18:26 2012 +++ src/sys/dev/isapnp/if_tr_isapnp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tr_isapnp.c,v 1.21 2012/10/27 17:18:26 chs Exp $ */ +/* $NetBSD: if_tr_isapnp.c,v 1.22 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tr_isapnp.c,v 1.21 2012/10/27 17:18:26 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tr_isapnp.c,v 1.22 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -86,15 +86,16 @@ tr_isapnp_attach(device_t parent, device struct isapnp_attach_args *ipa = aux; int mmioidx, sramidx; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) { aprint_error_dev(self, "error in region allocation\n"); return; } - printf("%s: %s %s\n", device_xname(self), ipa->ipa_devident, - ipa->ipa_devclass); + aprint_normal_dev(self, "%s %s\n", + ipa->ipa_devident, ipa->ipa_devclass); sc->sc_dev = self; sc->sc_piot = ipa->ipa_iot; @@ -103,8 +104,7 @@ tr_isapnp_attach(device_t parent, device if (strcmp(ipa->ipa_devlogic, "TCM3190") == 0) { mmioidx = 0; sramidx = 1; - } - else { /* Default */ + } else { /* Default */ mmioidx = 1; sramidx = 0; } Index: src/sys/dev/mca/edc_mca.c diff -u src/sys/dev/mca/edc_mca.c:1.51 src/sys/dev/mca/edc_mca.c:1.52 --- src/sys/dev/mca/edc_mca.c:1.51 Mon Jul 11 11:31:51 2016 +++ src/sys/dev/mca/edc_mca.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: edc_mca.c,v 1.51 2016/07/11 11:31:51 msaitoh Exp $ */ +/* $NetBSD: edc_mca.c,v 1.52 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.51 2016/07/11 11:31:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.52 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -200,7 +200,8 @@ edc_mca_attach(device_t parent, device_t iobase = (pos2 & IO_IS_ALT) ? ESDIC_IOALT : ESDIC_IOPRM; drq = (pos2 & DRQ_MASK) >> 2; - printf(" slot %d irq %d drq %d: %s\n", ma->ma_slot+1, + aprint_naive("\n"); + aprint_normal(": slot %d irq %d drq %d: %s\n", ma->ma_slot+1, irq, drq, typestr); #ifdef DIAGNOSTIC @@ -215,8 +216,7 @@ edc_mca_attach(device_t parent, device_t } #endif - printf("%s: Fairness %s, Release %s, ", - device_xname(sc->sc_dev), + aprint_normal_dev(self, "Fairness %s, Release %s, ", (pos2 & FAIRNESS_ENABLE) ? "On" : "Off", (pos4 & RELEASE_1) ? "6ms" : ((pos4 & RELEASE_2) ? "3ms" : "Immediate") @@ -224,10 +224,10 @@ edc_mca_attach(device_t parent, device_t if ((pos4 & PACING_CTRL_DISABLE) == 0) { static const char * const pacint[] = { "disabled", "16ms", "24ms", "31ms"}; - printf("DMA burst pacing interval %s\n", + aprint_normal("DMA burst pacing interval %s\n", pacint[(pos3 & PACING_INT_MASK) >> 4]); } else - printf("DMA pacing control disabled\n"); + aprint_normal("DMA pacing control disabled\n"); sc->sc_iot = ma->ma_iot; @@ -271,8 +271,8 @@ edc_mca_attach(device_t parent, device_t /* Do a reset to ensure sane state after warm boot. */ if (bus_space_read_1(sc->sc_iot, sc->sc_ioh, BSR) & BSR_BUSY) { /* hard reset */ - printf("%s: controller busy, performing hardware reset ...\n", - device_xname(sc->sc_dev)); + aprint_normal_dev(self, "controller busy, " + "performing hardware reset ...\n"); bus_space_write_1(sc->sc_iot, sc->sc_ioh, BCR, BCR_INT_ENABLE|BCR_RESET); } else { @@ -323,7 +323,7 @@ edc_mca_attach(device_t parent, device_t } if (devno == sc->sc_maxdevs) { - printf("%s: disabling controller (no drives attached)\n", + aprint_error("%s: disabling controller (no drives attached)\n", device_xname(sc->sc_dev)); mca_intr_disestablish(ma->ma_mc, sc->sc_ih); return; Index: src/sys/dev/mca/esp_mca.c diff -u src/sys/dev/mca/esp_mca.c:1.21 src/sys/dev/mca/esp_mca.c:1.22 --- src/sys/dev/mca/esp_mca.c:1.21 Mon Nov 23 02:13:47 2009 +++ src/sys/dev/mca/esp_mca.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: esp_mca.c,v 1.21 2009/11/23 02:13:47 rmind Exp $ */ +/* $NetBSD: esp_mca.c,v 1.22 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.21 2009/11/23 02:13:47 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.22 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -252,7 +252,7 @@ esp_mca_attach(device_t parent, device_t sc->sc_adapter.adapt_request = ncr53c9x_scsipi_request; /* Do the common parts of attachment. */ - printf("%s", device_xname(self)); + aprint_normal("%s", device_xname(self)); ncr53c9x_attach(sc); } Index: src/sys/dev/mca/mca.c diff -u src/sys/dev/mca/mca.c:1.31 src/sys/dev/mca/mca.c:1.32 --- src/sys/dev/mca/mca.c:1.31 Fri Jun 3 07:39:30 2011 +++ src/sys/dev/mca/mca.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mca.c,v 1.31 2011/06/03 07:39:30 matt Exp $ */ +/* $NetBSD: mca.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.31 2011/06/03 07:39:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -114,7 +114,8 @@ mca_attach(device_t parent, device_t sel int slot; mca_attach_hook(parent, self, mba); - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); iot = mba->mba_iot; memt = mba->mba_memt; @@ -156,7 +157,7 @@ mca_attach(device_t parent, device_t sel mca_print, config_stdsubmatch); else { mca_print(&ma, device_xname(self)); - printf(" disabled\n"); + aprint_normal(" disabled\n"); } } } Index: src/sys/dev/pci/ibmcd.c diff -u src/sys/dev/pci/ibmcd.c:1.1 src/sys/dev/pci/ibmcd.c:1.2 --- src/sys/dev/pci/ibmcd.c:1.1 Mon Dec 17 20:38:00 2012 +++ src/sys/dev/pci/ibmcd.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ibmcd.c,v 1.1 2012/12/17 20:38:00 mbalmer Exp $ */ +/* $NetBSD: ibmcd.c,v 1.2 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2012 Marc Balmer <m...@msys.ch> @@ -102,6 +102,7 @@ ibmcd_attach(device_t parent, device_t s struct gpiobus_attach_args gba; pcireg_t memtype; + aprint_naive("\n"); memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_MAPREG_START); if (pci_mapreg_map(pa, PCI_MAPREG_START, memtype, 0, &sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_iosize)) { @@ -110,7 +111,7 @@ ibmcd_attach(device_t parent, device_t s memtype == PCI_MAPREG_TYPE_IO ? "I/O" : "memory"); return; } - printf(": IBM 4810 BSP cash drawer\n"); + aprint_normal(": IBM 4810 BSP cash drawer\n"); #if (__NetBSD_Version__ >= 600000000) pmf_device_register(self, ibmcd_suspend, ibmcd_resume); Index: src/sys/dev/pci/if_ntwoc_pci.c diff -u src/sys/dev/pci/if_ntwoc_pci.c:1.29 src/sys/dev/pci/if_ntwoc_pci.c:1.30 --- src/sys/dev/pci/if_ntwoc_pci.c:1.29 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/if_ntwoc_pci.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ntwoc_pci.c,v 1.29 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: if_ntwoc_pci.c,v 1.30 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1998 Vixie Enterprises @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_pci.c,v 1.29 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_pci.c,v 1.30 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -202,7 +202,8 @@ ntwoc_pci_attach(device_t parent, device u_int numports; char intrbuf[PCI_INTRSTR_LEN]; - printf(": N2 Serial Interface\n"); + aprint_naive("\n"); + aprint_normal(": N2 Serial Interface\n"); flags = device_cfdata(self)->cf_flags; /* @@ -300,7 +301,7 @@ ntwoc_pci_attach(device_t parent, device * Port 1 HAS to be present. If it isn't, don't attach anything. */ if (db0 == NTWOC_FE_ID_NONE) { - printf("%s: no ports available\n", device_xname(self)); + aprint_error_dev(self, "no ports available\n"); return; } @@ -312,12 +313,12 @@ ntwoc_pci_attach(device_t parent, device if (db1 != NTWOC_FE_ID_NONE) numports++; - printf("%s: %d port%s\n", device_xname(self), numports, + aprint_normal_dev(self, "%d port%s\n", numports, (numports > 1 ? "s" : "")); - printf("%s: port 0 interface card: %s\n", device_xname(self), + aprint_normal_dev(self, "port 0 interface card: %s\n", ntwoc_pci_db_names[db0]); if (numports > 1) - printf("%s: port 1 interface card: %s\n", device_xname(self), + aprint_normal_dev(self, "port 1 interface card: %s\n", ntwoc_pci_db_names[db1]); /* Index: src/sys/dev/pci/if_sip.c diff -u src/sys/dev/pci/if_sip.c:1.162 src/sys/dev/pci/if_sip.c:1.163 --- src/sys/dev/pci/if_sip.c:1.162 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/pci/if_sip.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.162 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: if_sip.c,v 1.163 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.162 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.163 2016/07/14 10:19:06 msaitoh Exp $"); @@ -293,7 +293,7 @@ struct sip_softc { /* VLAN_ATTACHED */ int is_vlan; } sc_prev; - + short sc_if_flags; int sc_rxptr; /* next ready Rx descriptor/descsoft */ @@ -1000,7 +1000,7 @@ sipcom_attach(device_t parent, device_t sip = sipcom_lookup(pa, strcmp(cf->cf_name, "gsip") == 0); if (sip == NULL) { - printf("\n"); + aprint_error("\n"); panic("%s: impossible", __func__); } sc->sc_dev = self; @@ -1023,7 +1023,8 @@ sipcom_attach(device_t parent, device_t sc->sc_rev = PCI_REVISION(pa->pa_class); - printf(": %s, rev %#02x\n", sip->sip_name, sc->sc_rev); + aprint_naive("\n"); + aprint_normal(": %s, rev %#02x\n", sip->sip_name, sc->sc_rev); sc->sc_model = sip; @@ -1070,8 +1071,7 @@ sipcom_attach(device_t parent, device_t sc->sc_sh = ioh; sc->sc_sz = iosz; } else { - printf("%s: unable to map device registers\n", - device_xname(sc->sc_dev)); + aprint_error_dev(self, "unable to map device registers\n"); return; } @@ -1140,18 +1140,16 @@ sipcom_attach(device_t parent, device_t if ((error = bus_dmamap_create(sc->sc_dmat, sizeof(struct sip_control_data), 1, sizeof(struct sip_control_data), 0, 0, &sc->sc_cddmamap)) != 0) { - aprint_error_dev(sc->sc_dev, - "unable to create control data DMA map, error = %d\n", - error); + aprint_error_dev(self, "unable to create control data DMA map" + ", error = %d\n", error); sipcom_do_detach(self, SIP_ATTACH_MAP_MEM); } if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_cddmamap, sc->sc_control_data, sizeof(struct sip_control_data), NULL, 0)) != 0) { - aprint_error_dev(sc->sc_dev, - "unable to load control data DMA map, error = %d\n", - error); + aprint_error_dev(self, "unable to load control data DMA map" + ", error = %d\n", error); sipcom_do_detach(self, SIP_ATTACH_CREATE_MAP); } @@ -1162,8 +1160,8 @@ sipcom_attach(device_t parent, device_t if ((error = bus_dmamap_create(sc->sc_dmat, tx_dmamap_size, sc->sc_parm->p_ntxsegs, MCLBYTES, 0, 0, &sc->sc_txsoft[i].txs_dmamap)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to create tx DMA map %d, " - "error = %d\n", i, error); + aprint_error_dev(self, "unable to create tx DMA map %d" + ", error = %d\n", i, error); sipcom_do_detach(self, SIP_ATTACH_CREATE_TXMAP); } } @@ -1174,8 +1172,8 @@ sipcom_attach(device_t parent, device_t for (i = 0; i < sc->sc_parm->p_nrxdesc; i++) { if ((error = bus_dmamap_create(sc->sc_dmat, MCLBYTES, 1, MCLBYTES, 0, 0, &sc->sc_rxsoft[i].rxs_dmamap)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to create rx DMA map %d, " - "error = %d\n", i, error); + aprint_error_dev(self, "unable to create rx DMA map %d" + ", error = %d\n", i, error); sipcom_do_detach(self, SIP_ATTACH_CREATE_RXMAP); } sc->sc_rxsoft[i].rxs_mbuf = NULL; @@ -1207,8 +1205,7 @@ sipcom_attach(device_t parent, device_t (*sip->sip_variant->sipv_read_macaddr)(sc, pa, enaddr); - printf("%s: Ethernet address %s\n", device_xname(sc->sc_dev), - ether_sprintf(enaddr)); + aprint_normal_dev(self, "Ethernet address %s\n",ether_sprintf(enaddr)); /* * Initialize the configuration register: aggressive PCI @@ -1503,7 +1500,8 @@ sipcom_start(struct ifnet *ifp) MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { printf("%s: unable to allocate Tx " - "cluster\n", device_xname(sc->sc_dev)); + "cluster\n", + device_xname(sc->sc_dev)); m_freem(m); break; } @@ -1513,8 +1511,8 @@ sipcom_start(struct ifnet *ifp) error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); if (error) { - printf("%s: unable to load Tx buffer, " - "error = %d\n", device_xname(sc->sc_dev), error); + printf("%s: unable to load Tx buffer, error = " + "%d\n", device_xname(sc->sc_dev), error); break; } } else if (error == EFBIG) { @@ -1524,8 +1522,8 @@ sipcom_start(struct ifnet *ifp) * since we can't sanely copy a jumbo packet * to a single buffer. */ - printf("%s: Tx packet consumes too many " - "DMA segments, dropping...\n", device_xname(sc->sc_dev)); + printf("%s: Tx packet consumes too many DMA segments, " + "dropping...\n", device_xname(sc->sc_dev)); IFQ_DEQUEUE(&ifp->if_snd, m0); m_freem(m0); continue; @@ -1982,7 +1980,8 @@ sipcom_txintr(struct sip_softc *sc) sip_cdtxsync(sc, txs->txs_firstdesc, txs->txs_dmamap->dm_nsegs, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); - cmdsts = le32toh(*sipd_cmdsts(sc, &sc->sc_txdescs[txs->txs_lastdesc])); + cmdsts = le32toh(*sipd_cmdsts(sc, + &sc->sc_txdescs[txs->txs_lastdesc])); if (cmdsts & CMDSTS_OWN) break; @@ -2472,7 +2471,8 @@ sipcom_reset(struct sip_softc *sc) } if (i == SIP_TIMEOUT) { - printf("%s: reset failed to complete\n", device_xname(sc->sc_dev)); + printf("%s: reset failed to complete\n", + device_xname(sc->sc_dev)); return false; } Index: src/sys/dev/pci/if_txp.c diff -u src/sys/dev/pci/if_txp.c:1.44 src/sys/dev/pci/if_txp.c:1.45 --- src/sys/dev/pci/if_txp.c:1.44 Thu Jul 14 04:00:46 2016 +++ src/sys/dev/pci/if_txp.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_txp.c,v 1.44 2016/07/14 04:00:46 msaitoh Exp $ */ +/* $NetBSD: if_txp.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2001 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.44 2016/07/14 04:00:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $"); #include "opt_inet.h" @@ -255,8 +255,8 @@ txp_attach(device_t parent, device_t sel if (sc->sc_ih == NULL) { aprint_error(": couldn't establish interrupt"); if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); + aprint_normal(" at %s", intrstr); + aprint_normal("\n"); return; } aprint_error(": interrupting at %s\n", intrstr); Index: src/sys/dev/pci/isic_pci.c diff -u src/sys/dev/pci/isic_pci.c:1.40 src/sys/dev/pci/isic_pci.c:1.41 --- src/sys/dev/pci/isic_pci.c:1.40 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/isic_pci.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: isic_pci.c,v 1.40 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: isic_pci.c,v 1.41 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_pci.c,v 1.40 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_pci.c,v 1.41 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -72,7 +72,8 @@ static int isic_pci_match(device_t, cfda static void isic_pci_attach(device_t, device_t, void *); static const struct isic_pci_product * find_matching_card(struct pci_attach_args *pa); -static void isic_pci_isdn_attach(struct pci_isic_softc *psc, struct pci_attach_args *pa, const char *cardname); +static void isic_pci_isdn_attach(struct pci_isic_softc *psc, + struct pci_attach_args *pa, const char *cardname); static int isic_pci_detach(device_t self, int flags); static int isic_pci_activate(device_t self, enum devact act); @@ -134,13 +135,14 @@ isic_pci_attach(device_t parent, device_ struct pci_attach_args *pa = aux; const struct isic_pci_product * prod; + aprint_naive("\n"); sc->sc_dev = self; /* Redo probe */ prod = find_matching_card(pa); if (prod == NULL) return; /* oops - not found?!? */ - printf(": %s\n", prod->name); + aprint_normal(": %s\n", prod->name); callout_init(&sc->sc_T3_callout, 0); callout_init(&sc->sc_T4_callout, 0); @@ -158,7 +160,8 @@ isic_pci_attach(device_t parent, device_ * isic - pci device driver attach routine *---------------------------------------------------------------------------*/ static void -isic_pci_isdn_attach(struct pci_isic_softc *psc, struct pci_attach_args *pa, const char *cardname) +isic_pci_isdn_attach(struct pci_isic_softc *psc, struct pci_attach_args *pa, + const char *cardname) { struct isic_softc *sc = &psc->sc_isic; pci_chipset_tag_t pc = pa->pa_pc; @@ -306,8 +309,10 @@ isic_pci_detach(device_t self, int flags { struct pci_isic_softc *psc = device_private(self); - bus_space_unmap(psc->sc_isic.sc_maps[0].t, psc->sc_isic.sc_maps[0].h, psc->sc_size); - bus_space_free(psc->sc_isic.sc_maps[0].t, psc->sc_isic.sc_maps[0].h, psc->sc_size); + bus_space_unmap(psc->sc_isic.sc_maps[0].t, psc->sc_isic.sc_maps[0].h, + psc->sc_size); + bus_space_free(psc->sc_isic.sc_maps[0].t, psc->sc_isic.sc_maps[0].h, + psc->sc_size); pci_intr_disestablish(psc->sc_pc, psc->sc_ih); return (0); Index: src/sys/dev/pci/iwic_pci.c diff -u src/sys/dev/pci/iwic_pci.c:1.19 src/sys/dev/pci/iwic_pci.c:1.20 --- src/sys/dev/pci/iwic_pci.c:1.19 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/iwic_pci.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: iwic_pci.c,v 1.19 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: iwic_pci.c,v 1.20 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved. @@ -36,7 +36,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iwic_pci.c,v 1.19 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iwic_pci.c,v 1.20 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -236,13 +236,14 @@ iwic_pci_attach(device_t parent, device pci_chipset_tag_t pc = pa->pa_pc; char intrbuf[PCI_INTRSTR_LEN]; + aprint_naive("\n"); sc->sc_dev = dev; sc->sc_cardname = iwic_find_card(pa); if (!sc->sc_cardname) return; /* Huh? */ - printf(": %s\n", sc->sc_cardname); + aprint_normal(": %s\n", sc->sc_cardname); if (pci_mapreg_map(pa, IWIC_PCI_IOBA, PCI_MAPREG_TYPE_IO, 0, &sc->sc_io_bt, &sc->sc_io_bh, &sc->sc_iobase, &sc->sc_iosize)) { @@ -338,7 +339,8 @@ struct isdn_layer1_isdnif_driver iwic_br iwic_mph_command_req }; -void iwic_set_link(void *, int channel, const struct isdn_l4_driver_functions * l4_driver, void *l4_driver_softc); +void iwic_set_link(void *, int channel, + const struct isdn_l4_driver_functions * l4_driver, void *l4_driver_softc); isdn_link_t *iwic_ret_linktab(void *, int channel); /* XXX Should be prototyped in some header, not here XXX */ @@ -438,7 +440,8 @@ iwic_ret_linktab(void *t, int channel) } void -iwic_set_link(void *t, int channel, const struct isdn_l4_driver_functions * l4_driver, void *l4_driver_softc) +iwic_set_link(void *t, int channel, + const struct isdn_l4_driver_functions * l4_driver, void *l4_driver_softc) { struct l2_softc *l2sc = t; struct iwic_softc *sc = l2sc->l1_token; Index: src/sys/dev/pci/jmide.c diff -u src/sys/dev/pci/jmide.c:1.20 src/sys/dev/pci/jmide.c:1.21 --- src/sys/dev/pci/jmide.c:1.20 Thu Jul 14 04:19:27 2016 +++ src/sys/dev/pci/jmide.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: jmide.c,v 1.20 2016/07/14 04:19:27 msaitoh Exp $ */ +/* $NetBSD: jmide.c,v 1.21 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.20 2016/07/14 04:19:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.21 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -161,11 +161,12 @@ jmide_attach(device_t parent, device_t s int ahci_used = 0; char intrbuf[PCI_INTRSTR_LEN]; + aprint_naive("\n"); sc->sc_pciide.sc_wdcdev.sc_atac.atac_dev = self; jp = jmide_lookup(pa->pa_id); if (jp == NULL) { - printf("jmide_attach: WTF?\n"); + aprint_error_dev(self, "jmide_attach: WTF?\n"); return; } sc->sc_npata = jp->jm_npata; Index: src/sys/dev/pci/njs_pci.c diff -u src/sys/dev/pci/njs_pci.c:1.11 src/sys/dev/pci/njs_pci.c:1.12 --- src/sys/dev/pci/njs_pci.c:1.11 Mon Jul 11 11:31:51 2016 +++ src/sys/dev/pci/njs_pci.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: njs_pci.c,v 1.11 2016/07/11 11:31:51 msaitoh Exp $ */ +/* $NetBSD: njs_pci.c,v 1.12 2016/07/14 10:19:06 msaitoh Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: njs_pci.c,v 1.11 2016/07/11 11:31:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: njs_pci.c,v 1.12 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -198,7 +198,7 @@ njs_pci_attach(device_t parent, device_t str_at, str_intr); return; } - printf("%s: interrupting%s%s\n", device_xname(self), str_at, str_intr); + aprint_normal_dev(self, "interrupting%s%s\n", str_at, str_intr); /* attach */ njsc32_attach(sc); Index: src/sys/dev/pci/pwdog.c diff -u src/sys/dev/pci/pwdog.c:1.8 src/sys/dev/pci/pwdog.c:1.9 --- src/sys/dev/pci/pwdog.c:1.8 Thu Apr 23 23:23:01 2015 +++ src/sys/dev/pci/pwdog.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $$NetBSD: pwdog.c,v 1.8 2015/04/23 23:23:01 pgoyette Exp $ */ +/* $$NetBSD: pwdog.c,v 1.9 2016/07/14 10:19:06 msaitoh Exp $ */ /* $OpenBSD: pwdog.c,v 1.7 2010/04/08 00:23:53 tedu Exp $ */ /* @@ -83,6 +83,7 @@ pwdog_attach(device_t parent, device_t s struct pci_attach_args *const pa = (struct pci_attach_args *)aux; pcireg_t memtype; + aprint_naive("\n"); memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_MAPREG_START); if (pci_mapreg_map(pa, PCI_MAPREG_START, memtype, 0, &sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_iosize)) { @@ -91,7 +92,7 @@ pwdog_attach(device_t parent, device_t s memtype == PCI_MAPREG_TYPE_IO ? "I/O" : "memory"); return; } - printf("\n"); + aprint_normal("\n"); sc->sc_dev = self; Index: src/sys/dev/pci/sv.c diff -u src/sys/dev/pci/sv.c:1.50 src/sys/dev/pci/sv.c:1.51 --- src/sys/dev/pci/sv.c:1.50 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/sv.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.50 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: sv.c,v 1.51 2016/07/14 10:19:06 msaitoh Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.50 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.51 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -350,7 +350,8 @@ sv_attach(device_t parent, device_t self pa = aux; pc = pa->pa_pc; pt = pa->pa_tag; - printf ("\n"); + aprint_naive("\n"); + aprint_normal("\n"); /* Map I/O registers */ if (pci_mapreg_map(pa, SV_ENHANCED_PORTBASE_SLOT, @@ -438,14 +439,14 @@ sv_attach(device_t parent, device_t self mutex_destroy(&sc->sc_intr_lock); return; } - printf("%s: interrupting at %s\n", device_xname(self), intrstr); - printf("%s: rev %d", device_xname(self), - sv_read_indirect(sc, SV_REVISION_LEVEL)); + aprint_normal_dev(self, "interrupting at %s\n", intrstr); + aprint_normal_dev(self, "rev %d", + sv_read_indirect(sc, SV_REVISION_LEVEL)); if (sv_read(sc, SV_CODEC_CONTROL) & SV_CTL_MD1) - printf(", reverb SRAM present"); + aprint_normal(", reverb SRAM present"); if (!(sv_read_indirect(sc, SV_WAVETABLE_SOURCE_SELECT) & SV_WSS_WT0)) - printf(", wavetable ROM present"); - printf("\n"); + aprint_normal(", wavetable ROM present"); + aprint_normal("\n"); /* Enable DMA interrupts */ reg = sv_read(sc, SV_CODEC_INTMASK); Index: src/sys/dev/pci/wcfb.c diff -u src/sys/dev/pci/wcfb.c:1.13 src/sys/dev/pci/wcfb.c:1.14 --- src/sys/dev/pci/wcfb.c:1.13 Fri Mar 20 01:20:15 2015 +++ src/sys/dev/pci/wcfb.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.13 2015/03/20 01:20:15 macallan Exp $ */ +/* $NetBSD: wcfb.c,v 1.14 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Miodrag Vallat. @@ -20,7 +20,7 @@ /* a driver for (some) 3DLabs Wildcat cards, based on OpenBSD's ifb driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.13 2015/03/20 01:20:15 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.14 2016/07/14 10:19:06 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -135,9 +135,9 @@ static void wcfb_putpalreg(struct wcfb_ static void wcfb_bitblt(struct wcfb_softc *, int, int, int, int, int, int, uint32_t); static void wcfb_rectfill(struct wcfb_softc *, int, int, int, int, int); -static void wcfb_rop_common(struct wcfb_softc *, bus_addr_t, int, int, int, +static void wcfb_rop_common(struct wcfb_softc *, bus_addr_t, int, int, int, int, int, int, uint32_t, int32_t); -static void wcfb_rop_jfb(struct wcfb_softc *, int, int, int, int, int, int, +static void wcfb_rop_jfb(struct wcfb_softc *, int, int, int, int, int, int, uint32_t, int32_t); static int wcfb_rop_wait(struct wcfb_softc *); @@ -178,7 +178,7 @@ wcfb_attach(device_t parent, device_t se if (!is_console) return; #endif sc->sc_memt = pa->pa_memt; - sc->sc_iot = pa->pa_iot; + sc->sc_iot = pa->pa_iot; sc->sc_pc = pa->pa_pc; sc->sc_pcitag = pa->pa_tag; @@ -208,13 +208,13 @@ wcfb_attach(device_t parent, device_t se bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_FB8_ADDR0) - sc->sc_fb; sc->sc_fb0 = sc->sc_fbaddr + sc->sc_fb0off; - sc->sc_fb1off = + sc->sc_fb1off = bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_FB8_ADDR1) - sc->sc_fb; sc->sc_fb1 = sc->sc_fbaddr + sc->sc_fb1off; sub = pci_conf_read(sc->sc_pc, sc->sc_pcitag, PCI_SUBSYS_ID_REG); - printf("subsys: %08x\n", sub); + aprint_normal("subsys: %08x\n", sub); switch (sub) { case WC_XVR1200: sc->sc_is_jfb = 1; @@ -232,26 +232,26 @@ wcfb_attach(device_t parent, device_t se sc->sc_stride = 1 << ((bus_space_read_4(sc->sc_regt, sc->sc_regh, WC_CONFIG) & 0x00ff0000) >> 16); - printf("%s: %d x %d, %d\n", device_xname(sc->sc_dev), + aprint_normal_dev(self, "%d x %d, %d\n", sc->sc_width, sc->sc_height, sc->sc_stride); if (sc->sc_is_jfb == 0) { sc->sc_shadow = kmem_alloc(sc->sc_stride * sc->sc_height, KM_SLEEP); if (sc->sc_shadow == NULL) { - printf("%s: failed to allocate shadow buffer\n", - device_xname(self)); + aprint_error_dev(self, + "failed to allocate shadow buffer\n"); return; } } for (i = 0x40; i < 0x100; i += 16) { - printf("%04x:", i); + aprint_normal("%04x:", i); for (j = 0; j < 16; j += 4) { - printf(" %08x", bus_space_read_4(sc->sc_regt, + aprint_normal(" %08x", bus_space_read_4(sc->sc_regt, sc->sc_regh, 0x8000 + i + j)); } - printf("\n"); + aprint_normal("\n"); } /* make sure video output is on */ @@ -375,7 +375,7 @@ wcfb_mmap(void *v, void *vs, off_t offse * restrict all other mappings to processes with superuser privileges * or the kernel itself */ - if (kauth_authorize_machdep(kauth_cred_get(), + if (kauth_authorize_machdep(kauth_cred_get(), KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL) != 0) { aprint_normal_dev(sc->sc_dev, "mmap() rejected.\n"); @@ -467,7 +467,7 @@ wcfb_putchar(void *cookie, int row, int to1 += sc->sc_stride; from += sc->sc_stride; } -} +} static void wcfb_putpalreg(struct wcfb_softc *sc, int i, int r, int g, int b) @@ -486,7 +486,7 @@ wcfb_cursor(void *cookie, int on, int ro struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; int coffset; - + if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) { if (ri->ri_flg & RI_CURSOR) { @@ -495,8 +495,8 @@ wcfb_cursor(void *cookie, int on, int ro #ifdef WSDISPLAY_SCROLLSUPPORT coffset += scr->scr_offset_to_zero; #endif - wcfb_putchar(cookie, ri->ri_crow, - ri->ri_ccol, scr->scr_chars[coffset], + wcfb_putchar(cookie, ri->ri_crow, + ri->ri_ccol, scr->scr_chars[coffset], scr->scr_attrs[coffset]); ri->ri_flg &= ~RI_CURSOR; } @@ -711,7 +711,7 @@ wcfb_rop_jfb(struct wcfb_softc *sc, int if (sc->sc_comm != NULL) { spr = sc->sc_comm[IFB_SHARED_TERM8_SPR >> 2]; splr = sc->sc_comm[IFB_SHARED_TERM8_SPLR >> 2]; - } else + } else #endif { /* supposedly sane defaults */ @@ -771,7 +771,7 @@ wcfb_acc_putchar(void *cookie, int row, sc->putchar(ri, row, col, c, attr); /* ... and then blit it into buffer 1 */ wcfb_bitblt(sc, x, y, x, y, wi, he, WC_ROP_COPY); -} +} static void wcfb_acc_cursor(void *cookie, int on, int row, int col) @@ -780,10 +780,10 @@ wcfb_acc_cursor(void *cookie, int on, in struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; int x, y, wi, he; - + wi = ri->ri_font->fontwidth; he = ri->ri_font->fontheight; - + if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) { x = ri->ri_ccol * wi + ri->ri_xorigin; y = ri->ri_crow * he + ri->ri_yorigin; @@ -814,7 +814,7 @@ wcfb_acc_copycols(void *cookie, int row, struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; int32_t xs, xd, y, width, height; - + if ((sc->sc_locked == 0) && (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)) { xs = ri->ri_xorigin + ri->ri_font->fontwidth * srccol; xd = ri->ri_xorigin + ri->ri_font->fontwidth * dstcol; @@ -833,7 +833,7 @@ wcfb_acc_erasecols(void *cookie, int row struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; int32_t x, y, width, height, fg, bg, ul; - + if ((sc->sc_locked == 0) && (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)) { x = ri->ri_xorigin + ri->ri_font->fontwidth * startcol; y = ri->ri_yorigin + ri->ri_font->fontheight * row; @@ -870,7 +870,7 @@ wcfb_acc_eraserows(void *cookie, int row struct vcons_screen *scr = ri->ri_hw; struct wcfb_softc *sc = scr->scr_cookie; int32_t x, y, width, height, fg, bg, ul; - + if ((sc->sc_locked == 0) && (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)) { x = ri->ri_xorigin; y = ri->ri_yorigin + ri->ri_font->fontheight * row; Index: src/sys/dev/pci/bktr/bktr_os.c diff -u src/sys/dev/pci/bktr/bktr_os.c:1.66 src/sys/dev/pci/bktr/bktr_os.c:1.67 --- src/sys/dev/pci/bktr/bktr_os.c:1.66 Thu Jul 7 06:55:42 2016 +++ src/sys/dev/pci/bktr/bktr_os.c Thu Jul 14 10:19:06 2016 @@ -1,6 +1,6 @@ /* $SourceForge: bktr_os.c,v 1.5 2003/03/11 23:11:25 thomasklausner Exp $ */ -/* $NetBSD: bktr_os.c,v 1.66 2016/07/07 06:55:42 msaitoh Exp $ */ +/* $NetBSD: bktr_os.c,v 1.67 2016/07/14 10:19:06 msaitoh Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp$ */ /* @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.66 2016/07/07 06:55:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.67 2016/07/14 10:19:06 msaitoh Exp $"); #ifdef __FreeBSD__ #include "bktr.h" @@ -1466,7 +1466,8 @@ bktr_attach(device_t parent, device_t se unit = device_unit(bktr->bktr_dev); bktr->dmat = pa->pa_dmat; - printf("\n"); + aprint_naive("\n"); + aprint_normal("\n"); /* Enable Bus Master XXX: check if all old DMA is stopped first (e.g. after warm @@ -1486,7 +1487,7 @@ bktr_attach(device_t parent, device_t se DPR(("pci_mapreg_map: size %lx\n", (unsigned long)bktr->obmemsz)); if (retval) { - printf("%s: couldn't map memory\n", bktr_name(bktr)); + aprint_error("%s: couldn't map memory\n", bktr_name(bktr)); return; } @@ -1500,7 +1501,7 @@ bktr_attach(device_t parent, device_t se * map interrupt */ if (pci_intr_map(pa, &ih)) { - printf("%s: couldn't map interrupt\n", + aprint_error("%s: couldn't map interrupt\n", bktr_name(bktr)); return; } @@ -1508,15 +1509,16 @@ bktr_attach(device_t parent, device_t se bktr->ih = pci_intr_establish(pa->pa_pc, ih, IPL_VIDEO, bktr_intr, bktr); if (bktr->ih == NULL) { - printf("%s: couldn't establish interrupt", + aprint_error("%s: couldn't establish interrupt", bktr_name(bktr)); if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); + aprint_normal(" at %s", intrstr); + aprint_normal("\n"); return; } if (intrstr != NULL) - printf("%s: interrupting at %s\n", bktr_name(bktr), intrstr); + aprint_normal("%s: interrupting at %s\n", bktr_name(bktr), + intrstr); selinit(&bktr->vbi_select); #endif /* __NetBSD__ */ Index: src/sys/dev/scsipi/ses.c diff -u src/sys/dev/scsipi/ses.c:1.48 src/sys/dev/scsipi/ses.c:1.49 --- src/sys/dev/scsipi/ses.c:1.48 Mon Aug 24 23:13:15 2015 +++ src/sys/dev/scsipi/ses.c Thu Jul 14 10:19:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ses.c,v 1.48 2015/08/24 23:13:15 pooka Exp $ */ +/* $NetBSD: ses.c,v 1.49 2016/07/14 10:19:06 msaitoh Exp $ */ /* * Copyright (C) 2000 National Aeronautics & Space Administration * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.48 2015/08/24 23:13:15 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.49 2016/07/14 10:19:06 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_scsi.h" @@ -286,7 +286,8 @@ ses_attach(device_t parent, device_t sel tname = "SAF-TE Compliant Device"; break; } - printf("\n%s: %s\n", device_xname(softc->sc_dev), tname); + aprint_naive("\n"); + aprint_normal("\n%s: %s\n", device_xname(softc->sc_dev), tname); } static enctyp