diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-12-16 03:19:08 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-12-16 03:19:08 +0000 |
commit | 429b263292e3ab35165d96a95fed7b5b2472ee7d (patch) | |
tree | 89a6b5a7fab584c34cb966f451be41ac892756de /sys | |
parent | 291d0f5a2b14be100ffb1b53c889592c58a439bf (diff) |
fix error printf's.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_pcn.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index c3db308f7ec..32487a22a83 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.3 2005/11/03 20:47:01 brad Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.4 2005/12/16 03:19:07 brad Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -638,8 +638,6 @@ pcn_attach(struct device *parent, struct device *self, void *aux) printf("\n"); return; } - printf(", %s, rev %d: %s, address %s\n", sc->sc_variant->pcv_desc, - CHIPID_VER(chipid), intrstr, ether_sprintf(enaddr)); /* * Allocate the control data structures, and create and load the @@ -648,32 +646,32 @@ pcn_attach(struct device *parent, struct device *self, void *aux) if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct pcn_control_data), PAGE_SIZE, 0, &seg, 1, &rseg, 0)) != 0) { - printf("%s: unable to allocate control data, error = %d\n", - sc->sc_dev.dv_xname, error); - goto fail_0; + printf(": unable to allocate control data, error = %d\n", + error); + return; } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(struct pcn_control_data), (caddr_t *)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { - printf("%s: unable to map control data, error = %d\n", - sc->sc_dev.dv_xname, error); + printf(": unable to map control data, error = %d\n", + error); goto fail_1; } if ((error = bus_dmamap_create(sc->sc_dmat, sizeof(struct pcn_control_data), 1, sizeof(struct pcn_control_data), 0, 0, &sc->sc_cddmamap)) != 0) { - printf("%s: unable to create control data DMA map, " - "error = %d\n", sc->sc_dev.dv_xname, error); + printf(": unable to create control data DMA map, " + "error = %d\n", error); goto fail_2; } if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_cddmamap, sc->sc_control_data, sizeof(struct pcn_control_data), NULL, 0)) != 0) { - printf("%s: unable to load control data DMA map, error = %d\n", - sc->sc_dev.dv_xname, error); + printf(": unable to load control data DMA map, error = %d\n", + error); goto fail_3; } @@ -682,8 +680,8 @@ pcn_attach(struct device *parent, struct device *self, void *aux) if ((error = bus_dmamap_create(sc->sc_dmat, MCLBYTES, PCN_NTXSEGS, MCLBYTES, 0, 0, &sc->sc_txsoft[i].txs_dmamap)) != 0) { - printf("%s: unable to create tx DMA map %d, " - "error = %d\n", sc->sc_dev.dv_xname, i, error); + printf(": unable to create tx DMA map %d, " + "error = %d\n", i, error); goto fail_4; } } @@ -692,13 +690,16 @@ pcn_attach(struct device *parent, struct device *self, void *aux) for (i = 0; i < PCN_NRXDESC; i++) { if ((error = bus_dmamap_create(sc->sc_dmat, MCLBYTES, 1, MCLBYTES, 0, 0, &sc->sc_rxsoft[i].rxs_dmamap)) != 0) { - printf("%s: unable to create rx DMA map %d, " - "error = %d\n", sc->sc_dev.dv_xname, i, error); + printf(": unable to create rx DMA map %d, " + "error = %d\n", i, error); goto fail_5; } sc->sc_rxsoft[i].rxs_mbuf = NULL; } + printf(", %s, rev %d: %s, address %s\n", sc->sc_variant->pcv_desc, + CHIPID_VER(chipid), intrstr, ether_sprintf(enaddr)); + /* Initialize our media structures. */ (*sc->sc_variant->pcv_mediainit)(sc); @@ -790,8 +791,6 @@ pcn_attach(struct device *parent, struct device *self, void *aux) sizeof(struct pcn_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); - fail_0: - return; } /* |