diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-11 05:03:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-11 05:03:11 +0000 |
commit | c450a44e46615b60372c7f8e4147b73c70711c33 (patch) | |
tree | 3586d41bdb5dc9cf3df7d4aa984ff566cd84f6a7 /sys | |
parent | 3e33bf5684527d729d6f8a0f413ae5c8fdeebaf4 (diff) |
make dmesg prints closer to the rest of the drivers
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/cz.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/esa.c | 18 | ||||
-rw-r--r-- | sys/dev/pci/if_stge.c | 20 |
3 files changed, 18 insertions, 36 deletions
diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index abac3bf2ac6..0b7178c2ca7 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.6 2002/11/19 18:40:17 jason Exp $ */ +/* $OpenBSD: cz.c,v 1.7 2003/08/11 05:03:10 mickey Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -300,23 +300,19 @@ cz_attach(parent, self, aux) struct tty *tp; int i; - printf(": Cyclades-Z multiport serial\n"); - cz->cz_plx.plx_pc = pa->pa_pc; cz->cz_plx.plx_tag = pa->pa_tag; if (pci_mapreg_map(pa, PLX_PCI_RUNTIME_MEMADDR, PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0, &cz->cz_plx.plx_st, &cz->cz_plx.plx_sh, NULL, NULL, 0) != 0) { - printf("%s: unable to map PLX registers\n", - cz->cz_dev.dv_xname); + printf(": unable to map PLX registers\n"); return; } if (pci_mapreg_map(pa, PLX_PCI_LOCAL_ADDR0, PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0, &cz->cz_win_st, &cz->cz_win_sh, NULL, NULL, 0) != 0) { - printf("%s: unable to map device window\n", - cz->cz_dev.dv_xname); + printf(": unable to map device window\n"); return; } @@ -355,15 +351,13 @@ cz_attach(parent, self, aux) cz_intr, cz, cz->cz_dev.dv_xname); } if (cz->cz_ih == NULL) { - printf("%s: unable to establish interrupt", - cz->cz_dev.dv_xname); + printf(": unable to establish interrupt"); if (intrstr != NULL) printf(" at %s", intrstr); printf("\n"); /* We will fall-back on polling mode. */ } else - printf("%s: interrupting at %s\n", - cz->cz_dev.dv_xname, intrstr); + printf(": %s\n", intrstr); polling_mode: if (cz->cz_ih == NULL) { diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 54fbca9dc09..ad56630c80c 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.6 2003/04/27 11:22:53 ho Exp $ */ +/* $OpenBSD: esa.c,v 1.7 2003/08/11 05:03:10 mickey Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -1016,13 +1016,7 @@ esa_attach(struct device *parent, struct device *self, void *aux) struct esa_card_type *card; const char *intrstr; u_int32_t data; - char devinfo[256]; - int revision, len; - int i; - - pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof devinfo); - revision = PCI_REVISION(pa->pa_class); - printf(": %s (rev. 0x%02x)\n", devinfo, revision); + int i, len; for (card = esa_card_types; card->pci_vendor_id; card++) if (PCI_VENDOR(pa->pa_id) == card->pci_vendor_id && @@ -1041,7 +1035,7 @@ esa_attach(struct device *parent, struct device *self, void *aux) /* Map I/O register */ if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot, &sc->sc_ioh, &sc->sc_iob, &sc->sc_ios, 0)) { - printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname); + printf(": can't map i/o space\n"); return; } @@ -1052,7 +1046,7 @@ esa_attach(struct device *parent, struct device *self, void *aux) /* Map and establish an interrupt */ if (pci_intr_map(pa, &ih)) { - printf("%s: can't map interrupt\n", sc->sc_dev.dv_xname); + printf(": can't map interrupt\n"); bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios); return; } @@ -1060,14 +1054,14 @@ esa_attach(struct device *parent, struct device *self, void *aux) sc->sc_ih = pci_intr_establish(pc, ih, IPL_AUDIO, esa_intr, self, sc->sc_dev.dv_xname); if (sc->sc_ih == NULL) { - printf("%s: can't establish interrupt", sc->sc_dev.dv_xname); + printf(": can't establish interrupt"); if (intrstr != NULL) printf(" at %s", intrstr); printf("\n"); bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios); return; } - printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr); + printf(": %s\n", intrstr); /* Power up chip */ esa_power(sc, PCI_PMCSR_STATE_D0); diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 2deddb1af0b..bfb1b183d93 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -407,13 +407,11 @@ stge_attach(struct device *parent, struct device *self, void *aux) sp = stge_lookup(pa); if (sp == NULL) { printf("\n"); - panic("ste_attach: impossible"); + panic("stge_attach: impossible"); } sc->sc_rev = PCI_REVISION(pa->pa_class); - printf(": %s, rev. %d\n", sp->stge_name, sc->sc_rev); - /* * Map the device. */ @@ -431,8 +429,7 @@ stge_attach(struct device *parent, struct device *self, void *aux) sc->sc_st = iot; sc->sc_sh = ioh; } else { - printf("%s: unable to map device registers\n", - sc->sc_dev.dv_xname); + printf(": unable to map device registers\n"); return; } @@ -451,13 +448,11 @@ stge_attach(struct device *parent, struct device *self, void *aux) * The card has lost all configuration data in * this state, so punt. */ - printf("%s: unable to wake up from power state D3\n", - sc->sc_dev.dv_xname); + printf(": unable to wake up from power state D3\n"); return; } if (pmode != 0) { - printf("%s: waking up from power state D%d\n", - sc->sc_dev.dv_xname, pmode); + printf(": waking up from power state D%d\n", pmode); pci_conf_write(pc, pa->pa_tag, pmreg + 4, 0); } } @@ -466,21 +461,20 @@ stge_attach(struct device *parent, struct device *self, void *aux) * Map and establish our interrupt. */ if (pci_intr_map(pa, &ih)) { - printf("%s: unable to map interrupt\n", sc->sc_dev.dv_xname); + printf(": unable to map interrupt\n"); return; } intrstr = pci_intr_string(pc, ih); sc->sc_ih = pci_intr_establish(pc, ih, IPL_NET, stge_intr, sc, sc->sc_dev.dv_xname); if (sc->sc_ih == NULL) { - printf("%s: unable to establish interrupt", - sc->sc_dev.dv_xname); + printf(": unable to establish interrupt"); if (intrstr != NULL) printf(" at %s", intrstr); printf("\n"); return; } - printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr); + printf(": %s, rev. %d, %s\n", sp->stge_name, sc->sc_rev, intrstr); /* * Allocate the control data structures, and create and load the |