summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-11-28 20:04:03 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-11-28 20:04:03 +0000
commit34d6e2062eea8b47037d6dea762228ccc1af6c41 (patch)
treef061dc06605f170b598e25c691db5f09717ae846 /sys/dev
parent0b442513804717fe0992aac756da208082b21610 (diff)
move printing of the interrupt string into re_attach().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cardbus/if_re_cardbus.c8
-rw-r--r--sys/dev/ic/re.c6
-rw-r--r--sys/dev/ic/revar.h4
-rw-r--r--sys/dev/pci/if_re_pci.c5
4 files changed, 11 insertions, 12 deletions
diff --git a/sys/dev/cardbus/if_re_cardbus.c b/sys/dev/cardbus/if_re_cardbus.c
index 41d75db40d7..ba390fa5385 100644
--- a/sys/dev/cardbus/if_re_cardbus.c
+++ b/sys/dev/cardbus/if_re_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_re_cardbus.c,v 1.10 2006/10/12 16:35:52 grange Exp $ */
+/* $OpenBSD: if_re_cardbus.c,v 1.11 2006/11/28 20:04:02 brad Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -120,8 +120,8 @@ re_cardbus_attach(struct device *parent, struct device *self, void *aux)
cardbus_function_tag_t cf = psc->sc_cf;
cardbus_devfunc_t ct = ca->ca_ct;
bus_addr_t adr;
+ char intrstr[16];
-
sc->sc_dmat = ca->ca_dmat;
csc->ct = ct;
csc->sc_tag = ca->ca_tag;
@@ -157,7 +157,7 @@ re_cardbus_attach(struct device *parent, struct device *self, void *aux)
Cardbus_function_disable(csc->ct);
return;
}
- printf(": irq %d", ca->ca_intrline);
+ snprintf(intrstr, sizeof(intrstr), "irq %d", ca->ca_intrline);
sc->sc_flags |= RL_ENABLED;
sc->rl_type = RL_8169;
@@ -166,7 +166,7 @@ re_cardbus_attach(struct device *parent, struct device *self, void *aux)
sc->sc_pwrhook = powerhook_establish(re_cardbus_powerhook, sc);
/* Call bus-independent (common) attach routine */
- re_attach(sc);
+ re_attach(sc, intrstr);
}
/*
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index ca9880ae424..847249d25c4 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.54 2006/11/24 04:27:17 brad Exp $ */
+/* $OpenBSD: re.c,v 1.55 2006/11/28 20:04:02 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -760,7 +760,7 @@ int boot_eaddr_valid;
* setup and ethernet/BPF attach.
*/
int
-re_attach(struct rl_softc *sc)
+re_attach(struct rl_softc *sc, const char *intrstr)
{
u_char eaddr[ETHER_ADDR_LEN];
u_int16_t as[ETHER_ADDR_LEN / 2];
@@ -820,7 +820,7 @@ re_attach(struct rl_softc *sc)
bcopy(eaddr, (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
- printf(", address %s\n",
+ printf(": %s, address %s\n", intrstr,
ether_sprintf(sc->sc_arpcom.ac_enaddr));
if (sc->rl_ldata.rl_tx_desc_cnt >
diff --git a/sys/dev/ic/revar.h b/sys/dev/ic/revar.h
index 0db8427bd50..b2034299033 100644
--- a/sys/dev/ic/revar.h
+++ b/sys/dev/ic/revar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: revar.h,v 1.4 2006/09/19 07:23:02 mickey Exp $ */
+/* $OpenBSD: revar.h,v 1.5 2006/11/28 20:04:02 brad Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -17,6 +17,6 @@
*/
int re_intr(void *);
-int re_attach(struct rl_softc *);
+int re_attach(struct rl_softc *, const char *);
int re_init(struct ifnet *);
void re_stop(struct ifnet *, int);
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c
index cc9cb19d0cc..9d7d71e3d22 100644
--- a/sys/dev/pci/if_re_pci.c
+++ b/sys/dev/pci/if_re_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_re_pci.c,v 1.18 2006/11/06 20:10:58 deraadt Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.19 2006/11/28 20:04:02 brad Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -184,7 +184,6 @@ re_pci_attach(struct device *parent, struct device *self, void *aux)
printf(" at %s", intrstr);
return;
}
- printf(": %s", intrstr);
sc->sc_dmat = pa->pa_dmat;
sc->sc_flags |= RL_ENABLED;
@@ -201,5 +200,5 @@ re_pci_attach(struct device *parent, struct device *self, void *aux)
sc->rl_type = RL_8169;
/* Call bus-independent attach routine */
- re_attach(sc);
+ re_attach(sc, intrstr);
}