summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/gem.c17
-rw-r--r--sys/dev/pci/if_gem_pci.c23
2 files changed, 17 insertions, 23 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 648b3938698..c759065cae3 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.37 2004/02/02 08:40:48 brad Exp $ */
+/* $OpenBSD: gem.c,v 1.38 2004/06/20 20:50:41 pvalchev Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -154,7 +154,7 @@ gem_config(sc)
if ((error = bus_dmamem_alloc(sc->sc_dmatag,
sizeof(struct gem_control_data), PAGE_SIZE, 0, &sc->sc_cdseg,
1, &sc->sc_cdnseg, 0)) != 0) {
- printf("%s: unable to allocate control data, error = %d\n",
+ printf("\n%s: unable to allocate control data, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail_0;
}
@@ -163,7 +163,7 @@ gem_config(sc)
if ((error = bus_dmamem_map(sc->sc_dmatag, &sc->sc_cdseg, sc->sc_cdnseg,
sizeof(struct gem_control_data), (caddr_t *)&sc->sc_control_data,
BUS_DMA_COHERENT)) != 0) {
- printf("%s: unable to map control data, error = %d\n",
+ printf("\n%s: unable to map control data, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail_1;
}
@@ -171,7 +171,7 @@ gem_config(sc)
if ((error = bus_dmamap_create(sc->sc_dmatag,
sizeof(struct gem_control_data), 1,
sizeof(struct gem_control_data), 0, 0, &sc->sc_cddmamap)) != 0) {
- printf("%s: unable to create control data DMA map, "
+ printf("\n%s: unable to create control data DMA map, "
"error = %d\n", sc->sc_dev.dv_xname, error);
goto fail_2;
}
@@ -179,7 +179,7 @@ gem_config(sc)
if ((error = bus_dmamap_load(sc->sc_dmatag, sc->sc_cddmamap,
sc->sc_control_data, sizeof(struct gem_control_data), NULL,
0)) != 0) {
- printf("%s: unable to load control data DMA map, error = %d\n",
+ printf("\n%s: unable to load control data DMA map, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail_3;
}
@@ -190,7 +190,7 @@ gem_config(sc)
for (i = 0; i < GEM_NRXDESC; i++) {
if ((error = bus_dmamap_create(sc->sc_dmatag, MCLBYTES, 1,
MCLBYTES, 0, 0, &sc->sc_rxsoft[i].rxs_dmamap)) != 0) {
- printf("%s: unable to create rx DMA map %d, "
+ printf("\n%s: unable to create rx DMA map %d, "
"error = %d\n", sc->sc_dev.dv_xname, i, error);
goto fail_5;
}
@@ -203,7 +203,7 @@ gem_config(sc)
if ((error = bus_dmamap_create(sc->sc_dmatag, MCLBYTES,
GEM_NTXSEGS, MCLBYTES, 0, BUS_DMA_NOWAIT,
&sc->sc_txd[i].sd_map)) != 0) {
- printf("%s: unable to create tx DMA map %d, "
+ printf("\n%s: unable to create tx DMA map %d, "
"error = %d\n", sc->sc_dev.dv_xname, i, error);
goto fail_6;
}
@@ -217,8 +217,7 @@ gem_config(sc)
*/
/* Announce ourselves. */
- printf("%s: address %s\n", sc->sc_dev.dv_xname,
- ether_sprintf(sc->sc_enaddr));
+ printf(", address %s\n", ether_sprintf(sc->sc_enaddr));
/* Get RX FIFO size */
sc->sc_rxfifosize = 64 *
diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c
index 62207fcc01a..316d567ff04 100644
--- a/sys/dev/pci/if_gem_pci.c
+++ b/sys/dev/pci/if_gem_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gem_pci.c,v 1.13 2003/12/29 23:06:55 brad Exp $ */
+/* $OpenBSD: if_gem_pci.c,v 1.14 2004/06/20 20:50:41 pvalchev Exp $ */
/* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */
/*
@@ -161,30 +161,25 @@ gem_attach_pci(parent, self, aux)
sc->sc_burst = 16; /* XXX */
- printf("\n");
- /*
- * call the main configure
- */
- gem_config(sc);
-
if (pci_intr_map(pa, &intrhandle) != 0) {
- printf("%s: couldn't map interrupt\n",
- sc->sc_dev.dv_xname);
+ printf(": couldn't map interrupt\n");
return; /* bus_unmap ? */
}
intrstr = pci_intr_string(pa->pa_pc, intrhandle);
gsc->gsc_ih = pci_intr_establish(pa->pa_pc,
intrhandle, IPL_NET, gem_intr, sc, self->dv_xname);
if (gsc->gsc_ih != NULL) {
- printf("%s: using %s for interrupt\n",
- sc->sc_dev.dv_xname,
- intrstr ? intrstr : "unknown interrupt");
+ printf(": %s", intrstr ? intrstr : "unknown interrupt");
} else {
- printf("%s: couldn't establish interrupt",
- sc->sc_dev.dv_xname);
+ printf(": couldn't establish interrupt");
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
return; /* bus_unmap ? */
}
+
+ /*
+ * call the main configure
+ */
+ gem_config(sc);
}