summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-06-27 02:38:39 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-06-27 02:38:39 +0000
commit267f60c7d7949235ad9af05b2de0a9c9c35fdba5 (patch)
tree08e4b47fc2742b2ae27f3cae817437c4e7544d7d
parentc585ebffd615ce5ca96e7b77a55098bc9298a713 (diff)
stop passing an empty enaddr around since we figure out the
MAC address in the common attach code and not the PCI/CardBus specific portions, this was a side effect of the code being split to support CardBus. ok beck@
-rw-r--r--sys/dev/cardbus/if_fxp_cardbus.c5
-rw-r--r--sys/dev/ic/fxp.c6
-rw-r--r--sys/dev/ic/fxpvar.h4
-rw-r--r--sys/dev/pci/if_fxp_pci.c5
4 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c
index 9c9ca2f0e8c..0adbcbd3d8f 100644
--- a/sys/dev/cardbus/if_fxp_cardbus.c
+++ b/sys/dev/cardbus/if_fxp_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_cardbus.c,v 1.6 2004/05/07 23:33:39 brad Exp $ */
+/* $OpenBSD: if_fxp_cardbus.c,v 1.7 2004/06/27 02:38:37 brad Exp $ */
/* $NetBSD: if_fxp_cardbus.c,v 1.12 2000/05/08 18:23:36 thorpej Exp $ */
/*
@@ -143,7 +143,6 @@ fxp_cardbus_attach(parent, self, aux)
cardbus_function_tag_t cf = psc->sc_cf;
bus_space_tag_t iot, memt;
bus_space_handle_t ioh, memh;
- u_int8_t enaddr[6];
bus_addr_t adr;
bus_size_t size;
@@ -198,7 +197,7 @@ fxp_cardbus_attach(parent, self, aux)
}
snprintf(intrstr, sizeof(intrstr), "irq %d", ca->ca_intrline);
- fxp_attach_common(sc, enaddr, intrstr);
+ fxp_attach_common(sc, intrstr);
}
void
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 02221bba25d..570b14deee7 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.53 2004/05/18 22:37:25 beck Exp $ */
+/* $OpenBSD: fxp.c,v 1.54 2004/06/27 02:38:37 brad Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -345,15 +345,15 @@ fxp_power(why, arg)
* Do generic parts of attach.
*/
int
-fxp_attach_common(sc, enaddr, intrstr)
+fxp_attach_common(sc, intrstr)
struct fxp_softc *sc;
- u_int8_t *enaddr;
const char *intrstr;
{
struct ifnet *ifp;
struct mbuf *m;
bus_dmamap_t rxmap;
u_int16_t data;
+ u_int8_t enaddr[6];
int i, err;
/*
diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h
index 9b974a7b76d..deaed03203a 100644
--- a/sys/dev/ic/fxpvar.h
+++ b/sys/dev/ic/fxpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxpvar.h,v 1.16 2004/05/18 22:37:25 beck Exp $ */
+/* $OpenBSD: fxpvar.h,v 1.17 2004/06/27 02:38:38 brad Exp $ */
/* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */
/*
@@ -125,7 +125,7 @@ struct fxp_softc {
bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (reg), (val))
extern int fxp_intr(void *);
-extern int fxp_attach_common(struct fxp_softc *, u_int8_t *, const char *);
+extern int fxp_attach_common(struct fxp_softc *, const char *);
extern int fxp_detach(struct fxp_softc *);
#define FXP_RXMAP_GET(sc) ((sc)->sc_rxmaps[(sc)->sc_rxfree++])
diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c
index e9832152c82..e8dda7f20c0 100644
--- a/sys/dev/pci/if_fxp_pci.c
+++ b/sys/dev/pci/if_fxp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_pci.c,v 1.26 2004/05/18 22:37:25 beck Exp $ */
+/* $OpenBSD: if_fxp_pci.c,v 1.27 2004/06/27 02:38:38 brad Exp $ */
/*
* Copyright (c) 1995, David Greenman
@@ -134,7 +134,6 @@ fxp_pci_attach(parent, self, aux)
pci_chipset_tag_t pc = pa->pa_pc;
pci_intr_handle_t ih;
const char *intrstr = NULL;
- u_int8_t enaddr[6];
bus_size_t iosize;
pcireg_t rev = PCI_REVISION(pa->pa_class);
@@ -224,7 +223,7 @@ fxp_pci_attach(parent, self, aux)
pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG));
/* Do generic parts of attach. */
- if (fxp_attach_common(sc, enaddr, intrstr)) {
+ if (fxp_attach_common(sc, intrstr)) {
/* Failed! */
pci_intr_disestablish(pc, sc->sc_ih);
bus_space_unmap(sc->sc_st, sc->sc_sh, iosize);