use aprint_*_dev and device_xname
This commit is contained in:
parent
34895c30e4
commit
801bd3ddec
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ea.c,v 1.13 2007/10/19 12:01:07 ad Exp $ */
|
||||
/* $NetBSD: if_ea.c,v 1.14 2008/04/05 20:08:52 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.13 2007/10/19 12:01:07 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.14 2008/04/05 20:08:52 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -109,7 +109,7 @@ eaattach(struct device *parent, struct device *self, void *aux)
|
||||
char *ptr;
|
||||
int i;
|
||||
|
||||
/* dprintf(("Attaching %s...\n", sc->sc_dev.dv_xname));*/
|
||||
/* dprintf(("Attaching %s...\n", device_xname(&sc->sc_dev)));*/
|
||||
|
||||
/* Set the address of the controller for easy access */
|
||||
podulebus_shift_tag(pa->pa_mod_t, EA_8005_SHIFT, &sc->sc_8005.sc_iot);
|
||||
@ -142,7 +142,7 @@ eaattach(struct device *parent, struct device *self, void *aux)
|
||||
/* Claim a podule interrupt */
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
device_xname(self), "intr");
|
||||
sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_NET, seeq8005intr,
|
||||
sc, &sc->sc_intrcnt);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_eb.c,v 1.11 2007/10/19 12:01:07 ad Exp $ */
|
||||
/* $NetBSD: if_eb.c,v 1.12 2008/04/05 20:08:52 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_eb.c,v 1.11 2007/10/19 12:01:07 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_eb.c,v 1.12 2008/04/05 20:08:52 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -107,7 +107,7 @@ ebattach(struct device *parent, struct device *self, void *aux)
|
||||
struct podulebus_attach_args *pa = aux;
|
||||
u_int8_t myaddr[ETHER_ADDR_LEN];
|
||||
|
||||
/* dprintf(("Attaching %s...\n", sc->sc_dev.dv_xname));*/
|
||||
/* dprintf(("Attaching %s...\n", device_xname(&sc->sc_dev)));*/
|
||||
|
||||
/* Set the address of the controller for easy access */
|
||||
podulebus_shift_tag(pa->pa_mod_t, EB_8004_SHIFT, &sc->sc_8005.sc_iot);
|
||||
@ -125,7 +125,7 @@ ebattach(struct device *parent, struct device *self, void *aux)
|
||||
/* Claim a podule interrupt */
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
device_xname(self), "intr");
|
||||
sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_NET, seeq8005intr,
|
||||
sc, &sc->sc_intrcnt);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ei.c,v 1.13 2007/10/19 12:01:07 ad Exp $ */
|
||||
/* $NetBSD: if_ei.c,v 1.14 2008/04/05 20:08:52 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ei.c,v 1.13 2007/10/19 12:01:07 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ei.c,v 1.14 2008/04/05 20:08:52 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -194,7 +194,7 @@ ei_attach(struct device *parent, struct device *self, void *aux)
|
||||
NULL, 0, 0);
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
device_xname(self), "intr");
|
||||
sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_NET, i82586_intr,
|
||||
self, &sc->sc_intrcnt);
|
||||
ei_cli(sc);
|
||||
@ -252,7 +252,7 @@ ei_copyin(struct ie_softc *sc_ie, void *dest, int src, size_t size)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (src % 2 != 0 || !ALIGNED_POINTER(dest, u_int16_t))
|
||||
panic("%s: unaligned copyin", sc_ie->sc_dev.dv_xname);
|
||||
panic("%s: unaligned copyin", device_xname(&sc_ie->sc_dev));
|
||||
#endif
|
||||
wptr = dest;
|
||||
extra_byte = size % 2;
|
||||
@ -292,13 +292,13 @@ ei_copyout(struct ie_softc *sc_ie, const void *src, int dest, size_t size)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (dest % 2 != 0)
|
||||
panic("%s: unaligned copyout", sc_ie->sc_dev.dv_xname);
|
||||
panic("%s: unaligned copyout", device_xname(&sc_ie->sc_dev));
|
||||
#endif
|
||||
if (!ALIGNED_POINTER(src, u_int16_t)) {
|
||||
bounce = (u_int16_t *) malloc(size, M_DEVBUF, M_NOWAIT);
|
||||
if (bounce == NULL)
|
||||
panic("%s: no memory to align copyout",
|
||||
sc_ie->sc_dev.dv_xname);
|
||||
device_xname(&sc_ie->sc_dev));
|
||||
memcpy(bounce, src, size);
|
||||
src = bounce;
|
||||
}
|
||||
@ -331,7 +331,7 @@ ei_read16(struct ie_softc *sc_ie, int addr)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (addr % 2 != 0)
|
||||
panic("%s: unaligned read16", sc_ie->sc_dev.dv_xname);
|
||||
panic("%s: unaligned read16", device_xname(&sc_ie->sc_dev));
|
||||
#endif
|
||||
s = splnet();
|
||||
ei_setpage(sc, ei_atop(addr));
|
||||
@ -349,7 +349,7 @@ ei_write16(struct ie_softc *sc_ie, int addr, u_int16_t value)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (addr % 2 != 0)
|
||||
panic("%s: unaligned write16", sc_ie->sc_dev.dv_xname);
|
||||
panic("%s: unaligned write16", device_xname(&sc_ie->sc_dev));
|
||||
#endif
|
||||
s = splnet();
|
||||
ei_setpage(sc, ei_atop(addr));
|
||||
@ -365,7 +365,7 @@ ei_write24(struct ie_softc *sc_ie, int addr, int value)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (addr % 2 != 0)
|
||||
panic("%s: unaligned write24", sc_ie->sc_dev.dv_xname);
|
||||
panic("%s: unaligned write24", device_xname(&sc_ie->sc_dev));
|
||||
#endif
|
||||
s = splnet();
|
||||
ei_write16(sc_ie, addr, value & 0xffff);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sec.c,v 1.9 2007/10/19 12:01:07 ad Exp $ */
|
||||
/* $NetBSD: sec.c,v 1.10 2008/04/05 20:08:52 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001, 2006 Ben Harris
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.9 2007/10/19 12:01:07 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.10 2008/04/05 20:08:52 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -205,7 +205,7 @@ sec_attach(struct device *parent, struct device *self, void *aux)
|
||||
wd33c93_attach(&sc->sc_sbic);
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
device_xname(self), "intr");
|
||||
sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO, sec_intr,
|
||||
sc, &sc->sc_intrcnt);
|
||||
sec_cli(sc);
|
||||
@ -494,7 +494,7 @@ sec_dumpdma(void *arg)
|
||||
|
||||
dmac_write(sc, NEC71071_CHANNEL, 0);
|
||||
printf("%s: DMA state: cur count %02x%02x cur addr %02x%02x%02x ",
|
||||
sc->sc_sbic.sc_dev.dv_xname,
|
||||
device_xname(&sc->sc_sbic.sc_dev),
|
||||
dmac_read(sc, NEC71071_COUNTHI), dmac_read(sc, NEC71071_COUNTLO),
|
||||
dmac_read(sc, NEC71071_ADDRHI), dmac_read(sc, NEC71071_ADDRMID),
|
||||
dmac_read(sc, NEC71071_ADDRLO));
|
||||
@ -505,11 +505,11 @@ sec_dumpdma(void *arg)
|
||||
dmac_read(sc, NEC71071_ADDRLO));
|
||||
printf("%s: DMA state: dctrl %1x%02x mode %02x status %02x req %02x "
|
||||
"mask %02x\n",
|
||||
sc->sc_sbic.sc_dev.dv_xname, dmac_read(sc, NEC71071_DCTRL2),
|
||||
device_xname(&sc->sc_sbic.sc_dev), dmac_read(sc, NEC71071_DCTRL2),
|
||||
dmac_read(sc, NEC71071_DCTRL1), dmac_read(sc, NEC71071_MODE),
|
||||
dmac_read(sc, NEC71071_STATUS), dmac_read(sc, NEC71071_REQUEST),
|
||||
dmac_read(sc, NEC71071_MASK));
|
||||
printf("%s: soft DMA state: %zd@%p%s%d\n", sc->sc_sbic.sc_dev.dv_xname,
|
||||
printf("%s: soft DMA state: %zd@%p%s%d\n", device_xname(&sc->sc_sbic.sc_dev),
|
||||
sc->sc_dmalen, sc->sc_dmaaddr, sc->sc_dmain ? "<-" : "->",
|
||||
sc->sc_dmaoff);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user