use aprint_*_dev and device_xname

This commit is contained in:
cegger 2008-04-08 20:40:42 +00:00
parent 2c7f43b53e
commit 1ef783cb7b
22 changed files with 215 additions and 229 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cir.c,v 1.18 2008/03/01 14:16:50 rmind Exp $ */
/* $NetBSD: cir.c,v 1.19 2008/04/08 20:42:51 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.18 2008/03/01 14:16:50 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.19 2008/04/08 20:42:51 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -101,7 +101,7 @@ cir_attach(struct device *parent, struct device *self, void *aux)
if (sc->sc_methods->im_read == NULL ||
sc->sc_methods->im_write == NULL ||
sc->sc_methods->im_setparams == NULL)
panic("%s: missing methods", sc->sc_dev.dv_xname);
panic("%s: missing methods", device_xname(&sc->sc_dev));
#endif
printf("\n");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gt.c,v 1.15 2007/12/03 15:34:32 ad Exp $ */
/* $NetBSD: gt.c,v 1.16 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.15 2007/12/03 15:34:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.16 2008/04/08 20:40:42 cegger Exp $");
#include "opt_marvell.h"
#include "locators.h"
@ -174,50 +174,50 @@ gt_attach_common(struct gt_softc *gt)
#if DEBUG
loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS0_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS0_High_Decode));
aprint_normal("%s: scs[0]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " scs[0]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS1_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS1_High_Decode));
aprint_normal("%s: scs[1]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " scs[1]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS2_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS2_High_Decode));
aprint_normal("%s: scs[2]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " scs[2]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS3_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS3_High_Decode));
aprint_normal("%s: scs[3]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " scs[3]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS0_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS0_High_Decode));
aprint_normal("%s: cs[0]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cs[0]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS1_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS1_High_Decode));
aprint_normal("%s: cs[1]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cs[1]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS2_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS2_High_Decode));
aprint_normal("%s: cs[2]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cs[2]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS3_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS3_High_Decode));
aprint_normal("%s: cs[3]=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cs[3]=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_BootCS_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_BootCS_High_Decode));
aprint_normal("%s: bootcs=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " bootcs=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_IO_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_IO_High_Decode));
aprint_normal("%s: pci0io=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci0io=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_IO_Remap);
aprint_normal("remap=%#010x\n", loaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem0_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem0_High_Decode));
aprint_normal("%s: pci0mem[0]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci0mem[0]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem0_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem0_Remap_High);
@ -225,7 +225,7 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem1_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem1_High_Decode));
aprint_normal("%s: pci0mem[1]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci0mem[1]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem1_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem1_Remap_High);
@ -233,7 +233,7 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem2_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem2_High_Decode));
aprint_normal("%s: pci0mem[2]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci0mem[2]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem2_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem2_Remap_High);
@ -241,7 +241,7 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem3_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem3_High_Decode));
aprint_normal("%s: pci0mem[3]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci0mem[3]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem3_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem3_Remap_High);
@ -249,14 +249,14 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_IO_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_IO_High_Decode));
aprint_normal("%s: pci1io=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci1io=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_IO_Remap);
aprint_normal("remap=%#010x\n", loaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem0_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem0_High_Decode));
aprint_normal("%s: pci1mem[0]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci1mem[0]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem0_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem0_Remap_High);
@ -264,7 +264,7 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem1_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem1_High_Decode));
aprint_normal("%s: pci1mem[1]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci1mem[1]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem1_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem1_Remap_High);
@ -272,7 +272,7 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem2_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem2_High_Decode));
aprint_normal("%s: pci1mem[2]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci1mem[2]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem2_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem2_Remap_High);
@ -280,26 +280,26 @@ gt_attach_common(struct gt_softc *gt)
loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem3_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem3_High_Decode));
aprint_normal("%s: pci1mem[3]=%#10x-%#10x ", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " pci1mem[3]=%#10x-%#10x ", loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem3_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem3_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_Internal_Decode));
aprint_normal("%s: internal=%#10x-%#10x\n", gt->gt_dev.dv_xname,
aprint_normal_dev(&gt->gt_dev, " internal=%#10x-%#10x\n",
loaddr, loaddr+256*1024);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CPU0_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CPU0_High_Decode));
aprint_normal("%s: cpu0=%#10x-%#10x\n", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cpu0=%#10x-%#10x\n", loaddr, hiaddr);
loaddr = GT_LowAddr_GET(gt_read(gt, GT_CPU1_Low_Decode));
hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CPU1_High_Decode));
aprint_normal("%s: cpu1=%#10x-%#10x", gt->gt_dev.dv_xname, loaddr, hiaddr);
aprint_normal_dev(&gt->gt_dev, " cpu1=%#10x-%#10x", loaddr, hiaddr);
#endif
aprint_normal("%s:", gt->gt_dev.dv_xname);
aprint_normal_dev(&gt->gt_dev, "");
cpucfg = gt_read(gt, GT_CPU_Cfg);
cpucfg |= GT_CPUCfg_ConfSBDis; /* per errata #46 */
@ -364,7 +364,7 @@ gt_init_interrupt(struct gt_softc *gt)
* - set the configured GPP pins to input, active low, interrupt enbl
*/
#ifdef DEBUG
printf("%s: mpp cfg ", gt->gt_dev.dv_xname);
printf("%s: mpp cfg ", device_xname(&gt->gt_dev));
for (regoff = GT_MPP_Control0; regoff <= GT_MPP_Control3; regoff += 4)
printf("%#x ", gt_read(gt, regoff));
printf(", mppirpts 0x%x\n", mppirpts);
@ -525,7 +525,7 @@ gt_comm_intr(void *arg)
addr = gt_read(gt, GT_CommUnitIntr_ErrAddr);
printf("%s: Comm Unit irpt, cause %#x addr %#x\n",
gt->gt_dev.dv_xname, cause, addr);
device_xname(&gt->gt_dev), cause, addr);
cause &= GT_CommUnitIntr_DFLT;
if (cause == 0)
@ -534,7 +534,7 @@ gt_comm_intr(void *arg)
mask = 0x7;
for (i=0; i<7; i++) {
if (cause & mask) {
printf("%s: Comm Unit %s:", gt->gt_dev.dv_xname,
printf("%s: Comm Unit %s:", device_xname(&gt->gt_dev),
gt_comm_subunit_name[i]);
if (cause & 1)
printf(" AddrMiss");
@ -564,7 +564,7 @@ gt_comm_intr_enb(struct gt_softc *gt)
(void)gt_read(gt, GT_CommUnitIntr_ErrAddr);
intr_establish(IRQ_COMM, IST_LEVEL, IPL_VM, gt_comm_intr, gt);
printf("%s: Comm Unit irpt at %d\n", gt->gt_dev.dv_xname, IRQ_COMM);
printf("%s: Comm Unit irpt at %d\n", device_xname(&gt->gt_dev), IRQ_COMM);
}
#ifdef GT_ECC
@ -599,7 +599,7 @@ gt_ecc_intr(void *arg)
printf("%s: ECC error: %s: "
"addr %#x data %#x.%#x rec %#x calc %#x cnt %#x\n",
gt->gt_dev.dv_xname, gt_ecc_intr_str[err],
device_xname(&gt->gt_dev), gt_ecc_intr_str[err],
addr, dhi, dlo, rec, calc, count);
if (err == 2)
@ -627,7 +627,7 @@ gt_ecc_intr_enb(struct gt_softc *gt)
gt_write(gt, GT_ECC_Addr, 0); /* clear irpt */
intr_establish(IRQ_ECC, IST_LEVEL, IPL_VM, gt_ecc_intr, gt);
printf("%s: ECC irpt at %d\n", gt->gt_dev.dv_xname, IRQ_ECC);
printf("%s: ECC irpt at %d\n", device_xname(&gt->gt_dev), IRQ_ECC);
}
#endif /* GT_ECC */
@ -641,7 +641,7 @@ gt_watchdog_init(struct gt_softc *gt)
omsr = extintr_disable();
printf("%s: watchdog", gt->gt_dev.dv_xname);
printf("%s: watchdog", device_xname(&gt->gt_dev));
/*
* handle case where firmware started watchdog
@ -675,7 +675,7 @@ gt_watchdog_init(struct gt_softc *gt)
u_int32_t regoff;
unsigned int omsr;
printf("%s: watchdog", gt->gt_dev.dv_xname);
printf("%s: watchdog", device_xname(&gt->gt_dev));
if (mpp_watchdog == 0) {
printf(" not configured\n");
@ -896,14 +896,14 @@ gt_devbus_intr(void *arg)
if (cause & GT_DEVBUS_DBurstErr) {
printf("%s: Device Bus error: burst violation",
gt->gt_dev.dv_xname);
device_xname(&gt->gt_dev));
if ((cause & GT_DEVBUS_Sel) == 0)
printf(", addr %#x", addr);
printf("\n");
}
if (cause & GT_DEVBUS_DRdyErr) {
printf("%s: Device Bus error: ready timer expired",
gt->gt_dev.dv_xname);
device_xname(&gt->gt_dev));
if ((cause & GT_DEVBUS_Sel) != 0)
printf(", addr %#x\n", addr);
printf("\n");
@ -925,7 +925,7 @@ gt_devbus_intr_enb(struct gt_softc *gt)
intr_establish(IRQ_DEV, IST_LEVEL, IPL_VM, gt_devbus_intr, gt);
printf("%s: Device Bus Error irpt at %d\n",
gt->gt_dev.dv_xname, IRQ_DEV);
device_xname(&gt->gt_dev), IRQ_DEV);
}
@ -947,7 +947,7 @@ gt_mii_read(
if (count == 0) {
printf("%s: mii read for phy %d reg %d busied out\n",
child->dv_xname, phy, reg);
device_xname(child), phy, reg);
return ETH_ESMIR_Value_GET(data);
}
@ -961,10 +961,10 @@ gt_mii_read(
if (count == 0)
printf("%s: mii read for phy %d reg %d timed out\n",
child->dv_xname, phy, reg);
device_xname(child), phy, reg);
#if defined(GTMIIDEBUG)
printf("%s: mii_read(%d, %d): %#x data %#x\n",
child->dv_xname, phy, reg,
device_xname(child), phy, reg,
data, ETH_ESMIR_Value_GET(data));
#endif
return ETH_ESMIR_Value_GET(data);
@ -988,7 +988,7 @@ gt_mii_write (
if (count == 0) {
printf("%s: mii write for phy %d reg %d busied out (busy)\n",
child->dv_xname, phy, reg);
device_xname(child), phy, reg);
return;
}
@ -1003,10 +1003,10 @@ gt_mii_write (
if (count == 0)
printf("%s: mii write for phy %d reg %d timed out\n",
child->dv_xname, phy, reg);
device_xname(child), phy, reg);
#if defined(GTMIIDEBUG)
printf("%s: mii_write(%d, %d, %#x)\n",
child->dv_xname, phy, reg, value);
device_xname(child), phy, reg, value);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gti2c.c,v 1.9 2007/12/16 14:21:43 he Exp $ */
/* $NetBSD: gti2c.c,v 1.10 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2005 Brocade Communcations, inc.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.9 2007/12/16 14:21:43 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.10 2008/04/08 20:40:42 cegger Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -266,7 +266,7 @@ gt_i2c_attach(struct device *parent, struct device *self, void *aux)
intr_establish(IRQ_I2C, IST_LEVEL, IPL_VM, gt_i2c_intr, sc);
evcnt_attach_dynamic(&sc->sc_ev_intr, EVCNT_TYPE_INTR, NULL,
sc->sc_dev.dv_xname, "intr");
device_xname(&sc->sc_dev), "intr");
iba.iba_tag = &sc->sc_i2c;
config_found_ia(self, "i2cbus", &iba, iicbus_print);

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtidma.c,v 1.12 2007/10/19 12:00:33 ad Exp $ */
/* $NetBSD: gtidma.c,v 1.13 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.12 2007/10/19 12:00:33 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.13 2008/04/08 20:40:42 cegger Exp $");
#include "opt_idma.h"
#include "opt_ddb.h"
@ -336,11 +336,11 @@ idma_attach(
sc->idma_ih[3] = ih;
printf("%s: irpt at irqs %d, %d, %d, %d\n", sc->idma_dev.dv_xname,
printf("%s: irpt at irqs %d, %d, %d, %d\n", device_xname(&sc->idma_dev),
IRQ_IDMA0_1, IRQ_IDMA2_3, IRQ_IDMA4_5, IRQ_IDMA6_7);
#ifdef IDMA_ABORT_TEST
printf("%s: CAUTION: IDMA_ABORT_TEST enabled\n",
sc->idma_dev.dv_xname);
device_xname(&sc->idma_dev));
#endif
}
@ -996,7 +996,7 @@ idma_abort(idma_desch_t *iddhp, unsigned int flags, const char *str)
if (try >= 100)
panic("%s: idma_abort %p failed\n",
sc->idma_dev.dv_xname, iddhp);
device_xname(&sc->idma_dev), iddhp);
}
if ((flags & IDMA_ABORT_CANCEL) == 0)
@ -1207,7 +1207,7 @@ idma_done(
callback = idcp->idc_callback;
if (callback == 0) {
DIAGPRF(("%s: idma_done: chan %d no callback\n",
sc->idma_dev.dv_xname, chan));
device_xname(&sc->idma_dev), chan));
idma_desch_free(iddhp);
}
(*callback)(idcp->idc_arg, iddhp, ccause);
@ -1315,7 +1315,7 @@ idma_intr_comm(
if (iddhp == 0) {
DIAGPRF(("%s: idma_intr_comm: chan %d ccause 0x%x"
" idc_active == 0\n",
sc->idma_dev.dv_xname,
device_xname(&sc->idma_dev),
chan, ccause));
idma_qstart(sc, idcp, chan);
goto next;
@ -1337,14 +1337,14 @@ idma_intr_comm(
case IDMA_DESC_CTL_OWN:
DIAGPRF(("%s: idma_intr_comm: chan %d "
"descriptor OWN error, abort\n",
sc->idma_dev.dv_xname, chan));
device_xname(&sc->idma_dev), chan));
idma_abort(iddhp, 0, "idma_intr_comm: OWN error");
goto next;
case IDMA_DESC_CTL_TERM:
case (IDMA_DESC_CTL_OWN|IDMA_DESC_CTL_TERM):
DIAGPRF(("%s: idma_intr_comm: chan %d "
"transfer terminated, retry\n",
sc->idma_dev.dv_xname, chan));
device_xname(&sc->idma_dev), chan));
idma_retry(sc, idcp, chan, iddhp);
goto next;
}
@ -1422,12 +1422,12 @@ idma_print_active(
cur = gt_read(&sc->idma_gt->gt_dev, IDMA_CUR_REG(chan));
printf("%s: regs { %#x, %#x, %#x, %#x } current %#x\n",
sc->idma_dev.dv_xname, cnt, src, dst, nxt, cur);
device_xname(&sc->idma_dev), cnt, src, dst, nxt, cur);
do {
iddp = iddhp->idh_desc_va;
printf("%s: desc %p/%p { %#x, %#x, %#x, %#x }\n",
sc->idma_dev.dv_xname,
device_xname(&sc->idma_dev),
iddhp->idh_desc_va, iddhp->idh_desc_pa,
idma_desc_read(&iddp->idd_ctl),
idma_desc_read(&iddp->idd_src_addr),

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtmpsc.c,v 1.27 2007/11/19 18:51:48 ad Exp $ */
/* $NetBSD: gtmpsc.c,v 1.28 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.27 2007/11/19 18:51:48 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.28 2008/04/08 20:40:42 cegger Exp $");
#include "opt_kgdb.h"
@ -536,7 +536,7 @@ gtmpscattach(struct device *parent, struct device *self, void *aux)
(gt_reva_gtmpsc_bug) ? " [Rev A. bug]" : "");
if (is_console)
aprint_normal("%s: console\n", sc->gtmpsc_dev.dv_xname);
aprint_normal_dev(&sc->gtmpsc_dev, "console\n");
#ifdef DDB
if (is_console == 0)
@ -551,13 +551,12 @@ gtmpscattach(struct device *parent, struct device *self, void *aux)
*/
if (sc->gtmpsc_unit == comkgdbport) {
if (comkgdbport == 0) { /* FIXME */
printf("%s(kgdb): cannot share with console\n",
sc->gtmpsc_dev.dv_xname);
aprint_error_dev(&sc->gtmpsc_dev, "(kgdb): cannot share with console\n");
return;
}
sc->gtmpsc_flags |= GTMPSCF_KGDB;
printf("%s: kgdb\n", sc->gtmpsc_dev.dv_xname);
printf("%s: kgdb\n", device_xname(&sc->gtmpsc_dev));
gtmpsc_txflush(gtmpsc_scp[0]);
kgdb_attach(gtmpsc_kgdb_getc, gtmpsc_kgdb_putc, NULL);
kgdb_dev = 123; /* unneeded, only to satisfy some tests */
@ -1114,7 +1113,7 @@ gtmpsc_iflush(gtmpsc_softc_t *sc)
if (gtmpsc_common_pollc(sc->gtmpsc_unit, &c, &stat) == 0)
return;
#ifdef DIAGNOSTIC
printf("%s: gtmpsc_iflush timeout %02x\n", sc->gtmpsc_dev.dv_xname, c);
printf("%s: gtmpsc_iflush timeout %02x\n", device_xname(&sc->gtmpsc_dev), c);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtpci.c,v 1.17 2007/12/03 15:34:32 ad Exp $ */
/* $NetBSD: gtpci.c,v 1.18 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.17 2007/12/03 15:34:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.18 2008/04/08 20:40:42 cegger Exp $");
#include "opt_marvell.h"
#include <sys/param.h>
@ -292,8 +292,8 @@ gtpci_attach(struct device *parent, struct device *self, void *aux)
IPL_VM, gtpci_error_intr, pc);
intr_establish(pci_irqs[gtpc->gtpc_busno][2], IST_LEVEL,
IPL_VM, gtpci_error_intr, pc);
aprint_normal("%s: %s%d error interrupts at irqs %s, %s, %s\n",
pc->pc_parent->dv_xname, "pci", busno,
aprint_normal_dev(pc->pc_parent, "%d error interrupts at irqs %s, %s, %s\n",
"pci", busno,
intr_string(pci_irqs[gtpc->gtpc_busno][0]),
intr_string(pci_irqs[gtpc->gtpc_busno][1]),
intr_string(pci_irqs[gtpc->gtpc_busno][2]));
@ -491,7 +491,8 @@ gtpci_bus_attach_hook(struct device *parent, struct device *self,
data = gtpci_read(gtpc, PCI_COMMAND(gtpc->gtpc_busno));
if (data & (PCI_CMD_MSwapEn|PCI_CMD_SSwapEn)) {
aprint_normal("\n%s: ", self->dv_xname);
aprint_normal("\n");
aprint_normal_dev(self, "");
if (data & PCI_CMD_MSwapEn) {
switch (data & (PCI_CMD_MWordSwap|PCI_CMD_MByteSwap)) {
case PCI_CMD_MWordSwap:
@ -524,9 +525,11 @@ gtpci_bus_attach_hook(struct device *parent, struct device *self,
return;
data = gtpci_read(gtpc, PCI_BASE_ADDR_REGISTERS_ENABLE(gtpc->gtpc_busno));
aprint_normal("\n%s: BARs enabled: %#x", self->dv_xname, data);
aprint_normal("\n");
aprint_normal_dev(self, "BARs enabled: %#x", data);
aprint_normal("\n%s: 0:0:0\n", self->dv_xname);
aprint_normal("\n");
aprint_normal_dev(self, "0:0:0\n");
aprint_normal(" %sSCS0=%#010x",
(data & 1) ? "-" : "+",
gtpci_conf_read(&gtpc->gtpc_pc, gtpc->gtpc_self, 0x10));
@ -646,7 +649,8 @@ gtpci_bus_attach_hook(struct device *parent, struct device *self,
gtpci_read(gtpc, PCI_CPU_BASE_ADDR_REMAP(gtpc->gtpc_busno)));
for (i = 0; i < 8; i++) {
aprint_normal("\n%s: Access Control %d: ", self->dv_xname, i);
aprint_normal("\n");
aprint_normal_dev("Access Control %d: ", device_xname(self), i);
data = gtpci_read(gtpc,
PCI_ACCESS_CONTROL_BASE_HIGH(gtpc->gtpc_busno, i));
if (data)
@ -679,7 +683,7 @@ gtpci_error_intr(void *arg)
cause &= errmask | 0xf8000000;
gtpci_write(gtpc, PCI_ERROR_CAUSE(gtpc->gtpc_busno), ~cause);
printf("%s: pci%d error: cause=%#x mask=%#x",
pc->pc_parent->dv_xname, gtpc->gtpc_busno, cause, errmask);
device_xname(pc->pc_parent), gtpc->gtpc_busno, cause, errmask);
if ((cause & 0xf8000000) == 0) {
printf(" ?\n");
return 0;
@ -701,7 +705,7 @@ gtpci_error_intr(void *arg)
ahi = gtpci_read(gtpc, PCI_ERROR_ADDRESS_HIGH(gtpc->gtpc_busno));
alo = gtpci_read(gtpc, PCI_ERROR_ADDRESS_LOW(gtpc->gtpc_busno));
printf("\n%s: pci%d error: %s cmd=%#x",
pc->pc_parent->dv_xname, gtpc->gtpc_busno,
device_xname(pc->pc_parent), gtpc->gtpc_busno,
gtpci_error_strings[PCI_IC_SEL_GET(cause)], cmd);
if (dhi == 0)
printf(" data=%08x", dlo);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gfe.c,v 1.28 2008/02/07 01:21:54 dyoung Exp $ */
/* $NetBSD: if_gfe.c,v 1.29 2008/04/08 20:40:42 cegger Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.28 2008/02/07 01:21:54 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.29 2008/04/08 20:40:42 cegger Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -320,7 +320,7 @@ gfe_attach(struct device *parent, struct device *self, void *aux)
ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO);
}
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
strlcpy(ifp->if_xname, device_xname(&sc->sc_dev), IFNAMSIZ);
ifp->if_softc = sc;
/* ifp->if_mowner = &sc->sc_mowner; */
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@ -355,7 +355,7 @@ gfe_attach(struct device *parent, struct device *self, void *aux)
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0
rnd_attach_source(&sc->sc_rnd_source, self->dv_xname, RND_TYPE_NET, 0);
rnd_attach_source(&sc->sc_rnd_source, device_xname(self), RND_TYPE_NET, 0);
#endif
intr_establish(IRQ_ETH0 + sc->sc_macno, IST_LEVEL, IPL_NET,
gfe_intr, sc);
@ -551,7 +551,7 @@ gfe_ifwatchdog(struct ifnet *ifp)
struct gfe_txqueue * const txq = &sc->sc_txq[GE_TXPRIO_HI];
GE_FUNC_ENTER(sc, "gfe_ifwatchdog");
printf("%s: device timeout", sc->sc_dev.dv_xname);
printf("%s: device timeout", device_xname(&sc->sc_dev));
if (ifp->if_flags & IFF_RUNNING) {
uint32_t curtxdnum = (bus_space_read_4(sc->sc_gt_memt, sc->sc_gt_memh, txq->txq_ectdp) - txq->txq_desc_busaddr) / sizeof(txq->txq_descs[0]);
GE_TXDPOSTSYNC(sc, txq, txq->txq_fi);
@ -833,7 +833,7 @@ gfe_rx_process(struct gfe_softc *sc, uint32_t cause, uint32_t intrmask)
}
ifp->if_ierrors++;
GE_DPRINTF(sc, ("%s: rx queue %d filled at %u\n",
sc->sc_dev.dv_xname, rxprio, rxq->rxq_fi));
device_xname(&sc->sc_dev), rxprio, rxq->rxq_fi));
memset(masks, 0, sizeof(masks));
bus_dmamap_sync(sc->sc_dmat, rxq->rxq_desc_mem.gdm_map,
0, rxq->rxq_desc_mem.gdm_size,
@ -849,7 +849,7 @@ gfe_rx_process(struct gfe_softc *sc, uint32_t cause, uint32_t intrmask)
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
#if defined(DEBUG)
printf("%s: rx queue %d filled at %u=%#x(%#x/%#x)\n",
sc->sc_dev.dv_xname, rxprio, rxq->rxq_fi,
device_xname(&sc->sc_dev), rxprio, rxq->rxq_fi,
rxq->rxq_cmdsts, masks[0], masks[1]);
#endif
}
@ -1061,7 +1061,7 @@ gfe_tx_enqueue(struct gfe_softc *sc, enum gfe_txprio txprio)
}
#ifdef DEBUG
printf("%s: txenqueue: transmitter resynced at %d\n",
sc->sc_dev.dv_xname, txq->txq_fi);
device_xname(&sc->sc_dev), txq->txq_fi);
#endif
}
if (++txq->txq_fi == GE_TXDESC_MAX)
@ -1231,7 +1231,7 @@ gfe_tx_done(struct gfe_softc *sc, enum gfe_txprio txprio, uint32_t intrmask)
}
#ifdef DEBUG
printf("%s: txdone: transmitter resynced at %d\n",
sc->sc_dev.dv_xname, txq->txq_fi);
device_xname(&sc->sc_dev), txq->txq_fi);
#endif
}
#if 0
@ -1261,7 +1261,7 @@ gfe_tx_done(struct gfe_softc *sc, enum gfe_txprio txprio, uint32_t intrmask)
}
if (txq->txq_nactive != 0)
panic("%s: transmit fifo%d empty but active count (%d) > 0!",
sc->sc_dev.dv_xname, txprio, txq->txq_nactive);
device_xname(&sc->sc_dev), txprio, txq->txq_nactive);
ifp->if_timer = 0;
intrmask &= ~(txq->txq_intrbits & (ETH_IR_TxEndHigh|ETH_IR_TxEndLow));
intrmask &= ~(txq->txq_intrbits & (ETH_IR_TxBufferHigh|ETH_IR_TxBufferLow));
@ -1673,7 +1673,7 @@ gfe_hash_entry_op(struct gfe_softc *sc, enum gfe_hash_op op,
hash = gfe_hash_compute(sc, eaddr);
if (sc->sc_hashtable == NULL) {
panic("%s:%d: hashtable == NULL!", sc->sc_dev.dv_xname,
panic("%s:%d: hashtable == NULL!", device_xname(&sc->sc_dev),
__LINE__);
}
@ -1812,7 +1812,7 @@ gfe_hash_multichg(struct ethercom *ec, const struct ether_multi *enm, u_long cmd
error = gfe_hash_entry_op(sc, op, prio, enm->enm_addrlo);
if (error == EBUSY) {
printf("%s: multichg: tried to %s %s again\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
cmd == SIOCDELMULTI ? "remove" : "add",
ether_sprintf(enm->enm_addrlo));
GE_FUNC_EXIT(sc, "");
@ -1821,7 +1821,7 @@ gfe_hash_multichg(struct ethercom *ec, const struct ether_multi *enm, u_long cmd
if (error == ENOENT) {
printf("%s: multichg: failed to remove %s: not in table\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
ether_sprintf(enm->enm_addrlo));
GE_FUNC_EXIT(sc, "");
return 0;
@ -1829,13 +1829,13 @@ gfe_hash_multichg(struct ethercom *ec, const struct ether_multi *enm, u_long cmd
if (error == ENOSPC) {
printf("%s: multichg: failed to add %s: no space; regenerating table\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
ether_sprintf(enm->enm_addrlo));
GE_FUNC_EXIT(sc, "");
return ENETRESET;
}
GE_DPRINTF(sc, ("%s: multichg: %s: %s succeeded\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
cmd == SIOCDELMULTI ? "remove" : "add",
ether_sprintf(enm->enm_addrlo)));
GE_FUNC_EXIT(sc, "");
@ -1888,7 +1888,7 @@ gfe_hash_alloc(struct gfe_softc *sc)
BUS_DMA_NOCACHE);
if (error) {
printf("%s: failed to allocate %d bytes for hash table: %d\n",
sc->sc_dev.dv_xname, sc->sc_hashmask + 1, error);
device_xname(&sc->sc_dev), sc->sc_hashmask + 1, error);
GE_FUNC_EXIT(sc, "");
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: aha_mca.c,v 1.17 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: aha_mca.c,v 1.18 2008/04/08 20:41:00 cegger Exp $ */
/*
* Copyright (c) 2000-2002 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.17 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.18 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -151,7 +151,7 @@ aha_mca_attach(struct device *parent, struct device *self, void *aux)
((ma->ma_pos[3] & 0x40) >> 4);
if (bus_space_map(iot, iobase, AHA_ISA_IOSIZE, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't map i/o space\n");
return;
}
@ -166,8 +166,7 @@ aha_mca_attach(struct device *parent, struct device *self, void *aux)
sc->sc_ih = mca_intr_establish(mc, apd.sc_irq, IPL_BIO, aha_intr, sc);
if (sc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt\n");
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ed_mca.c,v 1.39 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: ed_mca.c,v 1.40 2008/04/08 20:41:00 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.39 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.40 2008/04/08 20:41:00 cegger Exp $");
#include "rnd.h"
@ -169,7 +169,7 @@ ed_mca_attach(parent, self, aux)
ed->sc_capacity);
printf("%s: %u spares/cyl, %s, %s, %s, %s, %s\n",
ed->sc_dev.dv_xname, ed->spares,
device_xname(&ed->sc_dev), ed->spares,
(drv_flags & (1 << 0)) ? "NoRetries" : "Retries",
(drv_flags & (1 << 1)) ? "Removable" : "Fixed",
(drv_flags & (1 << 2)) ? "SkewedFormat" : "NoSkew",
@ -180,10 +180,10 @@ ed_mca_attach(parent, self, aux)
/*
* Initialize and attach the disk structure.
*/
disk_init(&ed->sc_dk, ed->sc_dev.dv_xname, &eddkdriver);
disk_init(&ed->sc_dk, device_xname(&ed->sc_dev), &eddkdriver);
disk_attach(&ed->sc_dk);
#if NRND > 0
rnd_attach_source(&ed->rnd_source, ed->sc_dev.dv_xname,
rnd_attach_source(&ed->rnd_source, device_xname(&ed->sc_dev),
RND_TYPE_DISK, 0);
#endif
@ -208,7 +208,7 @@ edmcastrategy(bp)
struct disklabel *lp = ed->sc_dk.dk_label;
daddr_t blkno;
ATADEBUG_PRINT(("edmcastrategy (%s)\n", ed->sc_dev.dv_xname),
ATADEBUG_PRINT(("edmcastrategy (%s)\n", device_xname(&ed->sc_dev)),
DEBUG_XFERS);
/* Valid request? */
@ -460,7 +460,7 @@ edgetdisklabel(dev, ed)
edmcastrategy, lp, ed->sc_dk.dk_cpulabel);
}
if (errstring) {
printf("%s: %s\n", ed->sc_dev.dv_xname, errstring);
printf("%s: %s\n", device_xname(&ed->sc_dev), errstring);
return;
}
}
@ -580,7 +580,8 @@ edmcaioctl(dev, xfer, addr, flag, l)
return (EBADF);
/* If the ioctl happens here, the parent is us. */
strcpy(dkw->dkw_parent, ed->sc_dev.dv_xname);
strlcpy(dkw->dkw_parent, device_xname(&ed->sc_dev),
sizeof(dkw->dkw_parent));
return (dkwedge_add(dkw));
}
@ -592,7 +593,8 @@ edmcaioctl(dev, xfer, addr, flag, l)
return (EBADF);
/* If the ioctl happens here, the parent is us. */
strcpy(dkw->dkw_parent, ed->sc_dev.dv_xname);
strlcpy(dkw->dkw_parent, device_xname(&ed->sc_dev),
sizeof(dkw->dkw_parent));
return (dkwedge_del(dkw));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: edc_mca.c,v 1.38 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: edc_mca.c,v 1.39 2008/04/08 20:41:00 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.38 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.39 2008/04/08 20:41:00 cegger Exp $");
#include "rnd.h"
@ -216,14 +216,13 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
* utility uses only valid addresses.
*/
if (drq == 2 || drq >= 8) {
printf("%s: invalid DMA Arbitration Level %d\n",
sc->sc_dev.dv_xname, drq);
aprint_error_dev(&sc->sc_dev, "invalid DMA Arbitration Level %d\n", drq);
return;
}
#endif
printf("%s: Fairness %s, Release %s, ",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
(pos2 & FAIRNESS_ENABLE) ? "On" : "Off",
(pos4 & RELEASE_1) ? "6ms"
: ((pos4 & RELEASE_2) ? "3ms" : "Immediate")
@ -240,15 +239,13 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
if (bus_space_map(sc->sc_iot, iobase,
ESDIC_REG_NPORTS, 0, &sc->sc_ioh)) {
printf("%s: couldn't map registers\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't map registers\n");
return;
}
sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_BIO, edc_intr, sc);
if (sc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}
@ -257,8 +254,7 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
if ((error = mca_dmamap_create(sc->sc_dmat, MAXPHYS,
BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW | MCABUS_DMA_16BIT,
&sc->sc_dmamap_xfer, drq)) != 0){
printf("%s: couldn't create DMA map - error %d\n",
sc->sc_dev.dv_xname, error);
aprint_error_dev(&sc->sc_dev, "couldn't create DMA map - error %d\n", error);
return;
}
@ -280,7 +276,7 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
if (bus_space_read_1(sc->sc_iot, sc->sc_ioh, BSR) & BSR_BUSY) {
/* hard reset */
printf("%s: controller busy, performing hardware reset ...\n",
sc->sc_dev.dv_xname);
device_xname(&sc->sc_dev));
bus_space_write_1(sc->sc_iot, sc->sc_ioh, BCR,
BCR_INT_ENABLE|BCR_RESET);
} else {
@ -331,7 +327,7 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
if (devno == sc->sc_maxdevs) {
printf("%s: disabling controller (no drives attached)\n",
sc->sc_dev.dv_xname);
device_xname(&sc->sc_dev));
mca_intr_disestablish(ma->ma_mc, sc->sc_ih);
return;
}
@ -341,9 +337,8 @@ edc_mca_attach(struct device *parent, struct device *self, void *aux)
*/
config_pending_incr();
if ((error = kthread_create(PRI_NONE, 0, NULL, edcworker, sc, NULL,
"%s", sc->sc_dev.dv_xname))) {
printf("%s: cannot spawn worker thread: errno=%d\n",
sc->sc_dev.dv_xname, error);
"%s", device_xname(&sc->sc_dev)))) {
aprint_error_dev(&sc->sc_dev, "cannot spawn worker thread: errno=%d\n", error);
panic("edc_mca_attach");
}
}
@ -378,7 +373,7 @@ edc_intr(void *arg)
#ifdef EDC_DEBUG
if (intr_id == 0 || intr_id == 2 || intr_id == 4) {
printf("%s: bogus interrupt id %d\n", sc->sc_dev.dv_xname,
aprint_error_dev(&sc->sc_dev, "bogus interrupt id %d\n",
(int) intr_id);
return (0);
}
@ -402,7 +397,7 @@ edc_intr(void *arg)
#ifdef DEBUG
if (len > EDC_MAX_CMD_RES_LEN)
panic("%s: maximum Status Length exceeded: %d > %d",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
len, EDC_MAX_CMD_RES_LEN);
#endif
@ -464,7 +459,7 @@ edc_intr(void *arg)
* No status block available, so no further info.
*/
panic("%s: dev %d: attention error",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
devno);
/* NOTREACHED */
break;
@ -517,7 +512,7 @@ edc_do_attn(struct edc_mca_softc *sc, int attn_type, int devno, int intr_id)
if (attn_type == ATN_CMD_REQ
&& (bus_space_read_1(sc->sc_iot, sc->sc_ioh, BSR)
& BSR_INT_PENDING))
panic("%s: edc int pending", sc->sc_dev.dv_xname);
panic("%s: edc int pending", device_xname(&sc->sc_dev));
#endif
for(tries=1; tries < EDC_ATTN_MAXTRIES; tries++) {
@ -528,7 +523,7 @@ edc_do_attn(struct edc_mca_softc *sc, int attn_type, int devno, int intr_id)
if (tries == EDC_ATTN_MAXTRIES) {
printf("%s: edc_do_attn: timeout waiting for attachment to become available\n",
sc->sc_ed[devno]->sc_dev.dv_xname);
device_xname(&sc->sc_ed[devno]->sc_dev));
return (EIO);
}
}
@ -630,8 +625,7 @@ edc_run_cmd(struct edc_mca_softc *sc, int cmd, int devno,
if (tries == 10000
&& bus_space_read_1(sc->sc_iot, sc->sc_ioh, BSR)
& BSR_CIFR_FULL) {
printf("%s: device too slow to accept command %d\n",
sc->sc_dev.dv_xname, cmd);
aprint_error_dev(&sc->sc_dev, "device too slow to accept command %d\n", cmd);
return (EIO);
}
}
@ -747,32 +741,30 @@ edc_dump_status_block(struct edc_mca_softc *sc, u_int16_t *status_block,
{
#ifdef EDC_DEBUG
printf("%s: Command: %s, Status: %s (intr %d)\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
edc_commands[status_block[0] & 0x1f],
edc_cmd_status[SB_GET_CMD_STATUS(status_block)],
intr_id
);
#else
printf("%s: Command: %d, Status: %d (intr %d)\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
status_block[0] & 0x1f,
SB_GET_CMD_STATUS(status_block),
intr_id
);
#endif
printf("%s: # left blocks: %u, last processed RBA: %u\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
status_block[SB_RESBLKCNT_IDX],
(status_block[5] << 16) | status_block[4]);
if (intr_id == ISR_COMPLETED_WARNING) {
#ifdef EDC_DEBUG
printf("%s: Command Error Code: %s\n",
sc->sc_dev.dv_xname,
aprint_error_dev(&sc->sc_dev, "Command Error Code: %s\n",
edc_cmd_error[status_block[1] & 0xff]);
#else
printf("%s: Command Error Code: %d\n",
sc->sc_dev.dv_xname,
aprint_error_dev(&sc->sc_dev, "Command Error Code: %d\n",
status_block[1] & 0xff);
#endif
}
@ -782,7 +774,7 @@ edc_dump_status_block(struct edc_mca_softc *sc, u_int16_t *status_block,
char buf[100];
printf("%s: Device Error Code: %s\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
edc_dev_errors[status_block[2] & 0xff]);
bitmask_snprintf((status_block[2] & 0xff00) >> 8,
"\20"
@ -796,10 +788,10 @@ edc_dump_status_block(struct edc_mca_softc *sc, u_int16_t *status_block,
"\010Reserved0",
buf, sizeof(buf));
printf("%s: Device Status: %s\n",
sc->sc_dev.dv_xname, buf);
device_xname(&sc->sc_dev), buf);
#else
printf("%s: Device Error Code: %d, Device Status: %d\n",
sc->sc_dev.dv_xname,
device_xname(&sc->sc_dev),
status_block[2] & 0xff,
(status_block[2] & 0xff00) >> 8);
#endif
@ -881,7 +873,7 @@ edc_bio(struct edc_mca_softc *sc, struct ed_softc *ed, void *data,
if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap_xfer, data,
bcount, NULL, BUS_DMA_STREAMING|fl))) {
printf("%s: ed_bio: unable to load DMA buffer - error %d\n",
ed->sc_dev.dv_xname, error);
device_xname(&ed->sc_dev), error);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp_mca.c,v 1.16 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: esp_mca.c,v 1.17 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.16 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.17 2008/04/08 20:41:00 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -202,7 +202,7 @@ esp_mca_attach(
/* Map the 86C01 registers */
if (bus_space_map(ma->ma_iot, iobase, ESP_MCA_IOSIZE, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't map i/o space\n");
return;
}
@ -212,7 +212,7 @@ esp_mca_attach(
/* Submap the 'esp' registers */
if (bus_space_subregion(ma->ma_iot, ioh, ESP_REG_OFFSET,
ESP_MCA_IOSIZE-ESP_REG_OFFSET, &esc->sc_esp_ioh)) {
printf("%s: can't subregion i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't subregion i/o space\n");
return;
}
@ -221,8 +221,7 @@ esp_mca_attach(
if ((error = mca_dmamap_create(esc->sc_dmat, MAXPHYS,
BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW | MCABUS_DMA_IOPORT,
&esc->sc_xfer, drq)) != 0){
printf("%s: couldn't create DMA map - error %d\n",
sc->sc_dev.dv_xname, error);
aprint_error_dev(&sc->sc_dev, "couldn't create DMA map - error %d\n", error);
return;
}
@ -245,8 +244,7 @@ esp_mca_attach(
esc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_BIO, ncr53c9x_intr,
esc);
if (esc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt\n");
return;
}
@ -267,7 +265,7 @@ esp_mca_attach(
sc->sc_adapter.adapt_request = ncr53c9x_scsipi_request;
/* Do the common parts of attachment. */
printf("%s", sc->sc_dev.dv_xname);
printf("%s", device_xname(&sc->sc_dev));
ncr53c9x_attach(sc);
}
@ -334,7 +332,7 @@ esp_dma_intr(sc)
DPRINTF(("[esp_dma_intr] "));
if ((esc->sc_flags & ESP_XFER_ACTIVE) == 0) {
printf("%s: dma_intr--inactive DMA\n", sc->sc_dev.dv_xname);
printf("%s: dma_intr--inactive DMA\n", device_xname(&sc->sc_dev));
return (-1);
}
@ -347,7 +345,7 @@ esp_dma_intr(sc)
sc->sc_espstat |= NCRSTAT_TC; /* XXX */
if ((sc->sc_espstat & NCRSTAT_TC) == 0) {
printf("%s: DMA not complete?\n", sc->sc_dev.dv_xname);
printf("%s: DMA not complete?\n", device_xname(&sc->sc_dev));
return (1);
}
@ -387,8 +385,7 @@ esp_dma_setup(
DPRINTF(("[esp_dma_setup] "));
if (esc->sc_flags & ESP_XFER_LOADED) {
printf("%s: esp_dma_setup: unloading leaked xfer\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "esp_dma_setup: unloading leaked xfer\n");
bus_dmamap_unload(esc->sc_dmat, esc->sc_xfer);
esc->sc_flags &= ~ESP_XFER_LOADED;
}
@ -398,8 +395,7 @@ esp_dma_setup(
if ((error = bus_dmamap_load(esc->sc_dmat, esc->sc_xfer, *addr,
*len, NULL, BUS_DMA_STREAMING|fl))) {
printf("%s: esp_dma_setup: unable to load DMA buffer - error %d\n",
sc->sc_dev.dv_xname, error);
aprint_error_dev(&sc->sc_dev, "esp_dma_setup: unable to load DMA buffer - error %d\n", error);
return (error);
}
@ -430,7 +426,7 @@ esp_dma_stop(sc)
{
DPRINTF(("[esp_dma_stop] "));
panic("%s: stop not yet implemented", sc->sc_dev.dv_xname);
panic("%s: stop not yet implemented", device_xname(&sc->sc_dev));
}
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ate_mca.c,v 1.18 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: if_ate_mca.c,v 1.19 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ate_mca.c,v 1.18 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ate_mca.c,v 1.19 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -171,7 +171,8 @@ ate_mca_attach(struct device *parent, struct device *self,
atp = ate_mca_lookup(ma->ma_id);
#ifdef DIAGNOSTIC
if (atp == NULL) {
printf("\n%s: where did the card go?\n", sc->sc_dev.dv_xname);
aprint_normal("\n");
aprint_error_dev(&sc->sc_dev, "where did the card go?\n");
return;
}
#endif
@ -183,7 +184,7 @@ ate_mca_attach(struct device *parent, struct device *self,
/* Map i/o space. */
if (bus_space_map(iot, iobase, ATE_NPORTS, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't map i/o space\n");
return;
}
@ -207,8 +208,7 @@ ate_mca_attach(struct device *parent, struct device *self,
isc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET,
mb86960_intr, sc);
if (isc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_elmc_mca.c,v 1.23 2007/10/19 12:00:34 ad Exp $ */
/* $NetBSD: if_elmc_mca.c,v 1.24 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.23 2007/10/19 12:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.24 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -158,7 +158,7 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
/* map the pio registers */
if (bus_space_map(ma->ma_iot, iobase, ELMC_IOADDR_SIZE, 0, &ioh)) {
printf("%s: unable to map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map i/o space\n");
return;
}
@ -168,10 +168,9 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
* about. Just use the first 16K.
*/
if (bus_space_map(ma->ma_memt, pbram_addr, ELMC_MADDR_SIZE, 0, &memh)) {
printf("%s: unable to map memory space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map memory space\n");
if (pbram_addr == 0xc0000) {
printf("%s: memory space 0xc0000 may conflict with vga\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "memory space 0xc0000 may conflict with vga\n");
}
bus_space_unmap(ma->ma_iot, ioh, ELMC_IOADDR_SIZE);
@ -242,7 +241,7 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
bus_space_barrier(sc->bt, sc->bh, 0, sc->sc_msize,
BUS_SPACE_BARRIER_WRITE);
if (!i82586_proberam(sc)) {
printf("%s: can't talk to i82586!\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't talk to i82586!\n");
bus_space_unmap(asc->sc_regt, asc->sc_regh, ELMC_IOADDR_SIZE);
bus_space_unmap(sc->bt, sc->bh, ELMC_MADDR_SIZE);
@ -255,7 +254,7 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
/* dump known info */
printf("%s: rev %d, i/o %#04x-%#04x, mem %#06x-%#06x, %sternal xcvr\n",
sc->sc_dev.dv_xname, revision,
device_xname(&sc->sc_dev), revision,
iobase, iobase + ELMC_IOADDR_SIZE - 1,
pbram_addr, pbram_addr + ELMC_MADDR_SIZE - 1,
(pos2 & 0x20) ? "ex" : "in");
@ -267,15 +266,14 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
for(i=0; i < MIN(6, ETHER_ADDR_LEN); i++)
myaddr[i] = bus_space_read_1(asc->sc_regt, asc->sc_regh, i);
printf("%s:", sc->sc_dev.dv_xname);
printf("%s:", device_xname(&sc->sc_dev));
i82586_attach((void *)sc, "3C523", myaddr, NULL, 0, 0);
/* establish interrupt handler */
asc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, i82586_intr,
sc);
if (asc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ep_mca.c,v 1.18 2007/10/19 12:00:35 ad Exp $ */
/* $NetBSD: if_ep_mca.c,v 1.19 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ep_mca.c,v 1.18 2007/10/19 12:00:35 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ep_mca.c,v 1.19 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -196,7 +196,7 @@ ep_mca_attach(struct device *parent, struct device *self, void *aux)
/* map the pio registers */
if (bus_space_map(ma->ma_iot, iobase, MCA_IOSZ, 0, &ioh)) {
printf("%s: unable to map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map i/o space\n");
return;
}
@ -225,8 +225,7 @@ ep_mca_attach(struct device *parent, struct device *self, void *aux)
/* Map and establish the interrupt. */
sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, epintr, sc);
if (sc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}
@ -251,8 +250,7 @@ ep_mca_attach(struct device *parent, struct device *self, void *aux)
media = IFM_10_2;
break;
default:
printf("%s: cannot determine media\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, " cannot determine media\n");
return;
}
ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|media);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tr_mca.c,v 1.16 2006/11/16 01:33:05 christos Exp $ */
/* $NetBSD: if_tr_mca.c,v 1.17 2008/04/08 20:41:00 cegger Exp $ */
/*_
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.16 2006/11/16 01:33:05 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.17 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -176,19 +176,19 @@ tr_mca_attach(struct device *parent, struct device *self, void *aux)
/* map the pio registers */
if (bus_space_map(ma->ma_iot, iobase, TR_PIOSIZE, 0, &pioh)) {
printf("%s: unable to map PIO space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map PIO space\n");
return;
}
/* map the mmio registers */
if (bus_space_map(ma->ma_memt, rom_addr, TR_MMIOSIZE, 0, &mmioh)) {
printf("%s: unable to map MMIO space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map MMIO space\n");
return;
}
/* map the sram space */
if (bus_space_map(ma->ma_memt, sram_addr, sram_size, 0, &sramh)) {
printf("%s: unable to map SRAM space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map SRAM space\n");
return;
}
@ -224,8 +224,7 @@ tr_mca_attach(struct device *parent, struct device *self, void *aux)
/* establish interrupt handler */
sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, tr_intr, sc);
if (sc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tra_mca.c,v 1.8 2007/10/19 12:00:35 ad Exp $ */
/* $NetBSD: if_tra_mca.c,v 1.9 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.8 2007/10/19 12:00:35 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.9 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -194,8 +194,7 @@ tiara_mca_attach(struct device *parent, struct device *self, void *aux)
if ((pos2 & 0x80) != 0)
irq = smc_irq[((pos2 & 0x70) >> 4)];
else {
printf("%s: unsupported irq selected\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unsupported irq selected\n");
return;
}
@ -212,7 +211,8 @@ tiara_mca_attach(struct device *parent, struct device *self, void *aux)
#ifdef DIAGNOSTIC
tra_p = tiara_mca_lookup(ma->ma_id);
if (tra_p == NULL) {
printf("\n%s: where did the card go?\n", sc->sc_dev.dv_xname);
aprint_normal("\n");
aprint_error_dev(&sc->sc_dev, "where did the card go?\n");
return;
}
#endif
@ -221,7 +221,7 @@ tiara_mca_attach(struct device *parent, struct device *self, void *aux)
/* Map i/o space. */
if (bus_space_map(iot, iobase, TIARA_NPORTS, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "can't map i/o space\n");
return;
}
@ -248,8 +248,7 @@ tiara_mca_attach(struct device *parent, struct device *self, void *aux)
isc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET,
mb86950_intr, sc);
if (isc->sc_ih == NULL) {
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt handler\n");
return;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mca.c,v 1.24 2007/10/19 12:00:35 ad Exp $ */
/* $NetBSD: mca.c,v 1.25 2008/04/08 20:41:00 cegger Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.24 2007/10/19 12:00:35 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.25 2008/04/08 20:41:00 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -166,7 +166,7 @@ mca_attach(parent, self, aux)
config_found_sm_loc(self, "mca", locs, &ma,
mca_print, config_stdsubmatch);
else {
mca_print(&ma, self->dv_xname);
mca_print(&ma, device_xname(self));
printf(" disabled\n");
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: clmpcc_pcctwo.c,v 1.13 2007/10/19 12:00:36 ad Exp $ */
/* $NetBSD: clmpcc_pcctwo.c,v 1.14 2008/04/08 20:42:21 cegger Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clmpcc_pcctwo.c,v 1.13 2007/10/19 12:00:36 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: clmpcc_pcctwo.c,v 1.14 2008/04/08 20:42:21 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -176,7 +176,7 @@ clmpcc_pcctwo_iackhook(sc, which)
default:
#ifdef DEBUG
printf("%s: Invalid IACK number '%d'\n",
sc->sc_dev.dv_xname, which);
device_xname(&sc->sc_dev), which);
#endif
panic("clmpcc_pcctwo_iackhook %d", which);
}
@ -211,7 +211,7 @@ clmpcc_pcctwo_consiackhook(sc, which)
default:
#ifdef DEBUG
printf("%s: Invalid IACK number '%d'\n",
sc->sc_dev.dv_xname, which);
device_xname(&sc->sc_dev), which);
panic("clmpcc_pcctwo_consiackhook");
#endif
panic("clmpcc_pcctwo_iackhook %d", which);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie_mvme.c,v 1.11 2007/10/19 12:00:36 ad Exp $ */
/* $NetBSD: if_ie_mvme.c,v 1.12 2008/04/08 20:42:22 cegger Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.11 2007/10/19 12:00:36 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.12 2008/04/08 20:42:22 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -293,12 +293,12 @@ ie_pcctwo_attach(parent, self, args)
if (bus_dmamem_alloc(pa->pa_dmat, ether_data_buff_size, PAGE_SIZE, 0,
&seg, 1, &rseg,
BUS_DMA_NOWAIT | BUS_DMA_ONBOARD_RAM | BUS_DMA_24BIT) != 0) {
printf("%s: Failed to allocate ether buffer\n", self->dv_xname);
aprint_error_dev(self, "Failed to allocate ether buffer\n");
return;
}
if (bus_dmamem_map(pa->pa_dmat, &seg, rseg, ether_data_buff_size,
(void **) & sc->sc_maddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) {
printf("%s: Failed to map ether buffer\n", self->dv_xname);
aprint_error_dev(self, "Failed to map ether buffer\n");
bus_dmamem_free(pa->pa_dmat, &seg, rseg);
return;
}
@ -346,7 +346,7 @@ ie_pcctwo_attach(parent, self, args)
/* Register the event counter */
evcnt_attach_dynamic(&ps->ps_evcnt, EVCNT_TYPE_INTR,
pcctwointr_evcnt(pa->pa_ipl), "ether", sc->sc_dev.dv_xname);
pcctwointr_evcnt(pa->pa_ipl), "ether", device_xname(&sc->sc_dev));
/* Finally, hook the hardware interrupt */
pcctwointr_establish(PCCTWOV_LANC_IRQ, i82586_intr, pa->pa_ipl, sc,

View File

@ -1,4 +1,4 @@
/* $NetBSD: memc.c,v 1.7 2007/10/19 12:00:37 ad Exp $ */
/* $NetBSD: memc.c,v 1.8 2008/04/08 20:42:22 cegger Exp $ */
/*-
* Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: memc.c,v 1.7 2007/10/19 12:00:37 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: memc.c,v 1.8 2008/04/08 20:42:22 cegger Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -372,7 +372,7 @@ memc_init(sc)
(chipid == MEMC_CHIP_ID_MEMC040) ? "Parity" : "ECC",
memc_reg_read(sc, MEMC_REG_CHIP_REVISION));
printf("%s: Base Address: 0x%x, ", sc->sc_dev.dv_xname,
printf("%s: Base Address: 0x%x, ", device_xname(&sc->sc_dev),
MEMC_BASE_ADDRESS(memc_reg_read(sc, MEMC_REG_BASE_ADDRESS_HI),
memc_reg_read(sc, MEMC_REG_BASE_ADDRESS_LO)));
@ -475,7 +475,7 @@ memecc_attach(struct memc_softc *sc)
memc_reg_read(sc, MEMECC_REG_SCRUB_CONTROL) |
MEMECC_SCRUB_CONTROL_SCRBEN | MEMECC_SCRUB_CONTROL_SBEIEN);
printf("%s: Logging ECC errors at ipl %d\n", sc->sc_dev.dv_xname,
printf("%s: Logging ECC errors at ipl %d\n", device_xname(&sc->sc_dev),
MEMC_IRQ_LEVEL);
}
@ -601,10 +601,10 @@ memecc_log_error(struct memc_softc *sc, u_int8_t errlog, int off, int mbepanic)
etype = "Spurious";
printf("%s: %s error on %s%s access to 0x%08x.\n",
sc->sc_dev.dv_xname, etype, bm, rdwr, addr);
device_xname(&sc->sc_dev), etype, bm, rdwr, addr);
if ((errlog & MEMECC_ERROR_LOGGER_SBE) != 0)
printf("%s: ECC Syndrome 0x%02x (%s)\n", sc->sc_dev.dv_xname,
printf("%s: ECC Syndrome 0x%02x (%s)\n", device_xname(&sc->sc_dev),
syndrome, syntext);
/*
@ -639,6 +639,6 @@ memecc_log_error(struct memc_softc *sc, u_int8_t errlog, int off, int mbepanic)
memc_reg_write(sc, MEMECC_REG_SCRUB_CONTROL + off, rv);
panic("%s: Halting system to preserve data integrity.",
sc->sc_dev.dv_xname);
device_xname(&sc->sc_dev));
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mvmebus.c,v 1.12 2007/10/19 12:00:37 ad Exp $ */
/* $NetBSD: mvmebus.c,v 1.13 2008/04/08 20:42:22 cegger Exp $ */
/*-
* Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.12 2007/10/19 12:00:37 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.13 2008/04/08 20:42:22 cegger Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -145,7 +145,7 @@ mvmebus_offboard_ram(sc)
svr->vr_am = MVMEBUS_AM_DISABLED;
#ifdef DEBUG
printf("%s: No VMEbus master mapping for offboard RAM!\n",
sc->sc_dev.dv_xname);
device_xname(&sc->sc_dev));
#endif
return;
}
@ -179,11 +179,11 @@ mvmebus_attach(sc)
struct mvmebus_range *vr = &sc->sc_masters[i];
if (vr->vr_am == MVMEBUS_AM_DISABLED) {
printf("%s: Master#%d: disabled\n",
sc->sc_dev.dv_xname, i);
device_xname(&sc->sc_dev), i);
continue;
}
printf("%s: Master#%d: 0x%08lx -> %s\n",
sc->sc_dev.dv_xname, i,
device_xname(&sc->sc_dev), i,
vr->vr_locstart + (vr->vr_vmestart & vr->vr_mask),
mvmebus_mod_string(vr->vr_vmestart,
(vr->vr_vmeend - vr->vr_vmestart) + 1,
@ -194,11 +194,11 @@ mvmebus_attach(sc)
struct mvmebus_range *vr = &sc->sc_slaves[i];
if (vr->vr_am == MVMEBUS_AM_DISABLED) {
printf("%s: Slave#%d: disabled\n",
sc->sc_dev.dv_xname, i);
device_xname(&sc->sc_dev), i);
continue;
}
printf("%s: Slave#%d: 0x%08lx -> %s\n",
sc->sc_dev.dv_xname, i, vr->vr_locstart,
device_xname(&sc->sc_dev), i, vr->vr_locstart,
mvmebus_mod_string(vr->vr_vmestart,
(vr->vr_vmeend - vr->vr_vmestart) + 1,
vr->vr_am, vr->vr_datasize));
@ -422,12 +422,12 @@ mvmebus_intr_establish(vsc, handle, prior, func, arg)
#ifdef DIAGNOSTIC
if (vector < 0 || vector > 0xff) {
printf("%s: Illegal vector offset: 0x%x\n",
sc->sc_dev.dv_xname, vector);
device_xname(&sc->sc_dev), vector);
panic("mvmebus_intr_establish");
}
if (level < 1 || level > 7) {
printf("%s: Illegal interrupt level: %d\n",
sc->sc_dev.dv_xname, level);
device_xname(&sc->sc_dev), level);
panic("mvmebus_intr_establish");
}
#endif
@ -457,17 +457,17 @@ mvmebus_intr_disestablish(vsc, handle)
#ifdef DIAGNOSTIC
if (vector < 0 || vector > 0xff) {
printf("%s: Illegal vector offset: 0x%x\n",
sc->sc_dev.dv_xname, vector);
device_xname(&sc->sc_dev), vector);
panic("mvmebus_intr_disestablish");
}
if (level < 1 || level > 7) {
printf("%s: Illegal interrupt level: %d\n",
sc->sc_dev.dv_xname, level);
device_xname(&sc->sc_dev), level);
panic("mvmebus_intr_disestablish");
}
if (sc->sc_irqref[level] == 0) {
printf("%s: VMEirq#%d: Reference count already zero!\n",
sc->sc_dev.dv_xname, level);
device_xname(&sc->sc_dev), level);
panic("mvmebus_intr_disestablish");
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vme_two_isr.c,v 1.9 2008/01/04 21:17:59 ad Exp $ */
/* $NetBSD: vme_two_isr.c,v 1.10 2008/04/08 20:42:22 cegger Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vme_two_isr.c,v 1.9 2008/01/04 21:17:59 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: vme_two_isr.c,v 1.10 2008/04/08 20:42:22 cegger Exp $");
#include "vmetwo.h"
@ -318,7 +318,7 @@ vmetwo_intr_establish(csc, prior, lvl, vec, first, hand, arg, evcnt)
if (evcnt)
evcnt_attach_dynamic(evcnt, EVCNT_TYPE_INTR,
(*sc->sc_isrevcnt)(sc->sc_isrcookie, prior),
sc->sc_mvmebus.sc_dev.dv_xname,
device_xname(&sc->sc_mvmebus.sc_dev),
mvmebus_irq_name[lvl]);
#endif
iloffset = VME2_ILOFFSET_FROM_VECTOR(bitoff) +