summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2001-07-01 02:16:25 +0000
committeruwe <uwe@NetBSD.org>2001-07-01 02:16:25 +0000
commit87345845e1e0dc67b60b1df268a39caedc5848ec (patch)
tree14de64ddcec15e0eda5ff7f5a1d0c7e09bf3cf44 /sys/dev
parent284f72b8c26d8be1376fce6b2b4befb411587e42 (diff)
Make mhzc_alloc_ethernet search the right address range.
Fixes: kern/11451. Reviewed by: thorpej
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pcmcia/mhzc.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/sys/dev/pcmcia/mhzc.c b/sys/dev/pcmcia/mhzc.c
index 5012d895227..a9f624f5982 100644
--- a/sys/dev/pcmcia/mhzc.c
+++ b/sys/dev/pcmcia/mhzc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mhzc.c,v 1.6 2000/07/30 21:34:49 briggs Exp $ */
+/* $NetBSD: mhzc.c,v 1.7 2001/07/01 02:16:25 uwe Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@ const struct mhzc_product {
int mhzc_print __P((void *, const char *));
int mhzc_check_cfe __P((struct mhzc_softc *, struct pcmcia_config_entry *));
-int mhzc_alloc_ethernet __P((struct mhzc_softc *));
+int mhzc_alloc_ethernet __P((struct mhzc_softc *, struct pcmcia_config_entry *));
int mhzc_enable __P((struct mhzc_softc *, int));
void mhzc_disable __P((struct mhzc_softc *, int));
@@ -249,7 +249,7 @@ mhzc_attach(parent, self, aux)
return;
}
- if (mhzc_alloc_ethernet(sc) == 0) {
+ if (mhzc_alloc_ethernet(sc, cfe) == 0) {
printf("%s: unable to allocate space for Ethernet portion\n",
sc->sc_dev.dv_xname);
goto alloc_ethernet_failed;
@@ -306,13 +306,14 @@ mhzc_check_cfe(sc, cfe)
}
int
-mhzc_alloc_ethernet(sc)
+mhzc_alloc_ethernet(sc, cfe)
struct mhzc_softc *sc;
+ struct pcmcia_config_entry *cfe;
{
bus_addr_t addr, maxaddr;
- maxaddr = sc->sc_pf->sc->iobase + sc->sc_pf->sc->iosize;
- addr = sc->sc_pf->sc->iobase;
+ addr = cfe->iospace[0].start + cfe->iospace[0].length;
+ maxaddr = 0x1000;
/*
* Now round it up so that it starts on a 16-byte boundary.
@@ -340,7 +341,7 @@ mhzc_print(aux, pnp)
const char *name = aux;
if (pnp)
- printf("%s at %s", name, pnp);
+ printf("%s at %s(*)", name, pnp);
return (UNCONF);
}
@@ -701,6 +702,9 @@ com_mhzc_attach(parent, self, aux)
printf("unable to map I/O space\n");
return;
}
+ printf(" io 0x%x-0x%x",
+ (int)msc->sc_modem_pcioh.addr,
+ (int)(msc->sc_modem_pcioh.addr + msc->sc_modem_pcioh.size - 1));
msc->sc_flags |= MHZC_MODEM_MAPPED;
@@ -787,7 +791,9 @@ sm_mhzc_attach(parent, self, aux)
printf("unable to map I/O space\n");
return;
}
- printf("\n");
+ printf(" io 0x%x-0x%x\n",
+ (int)msc->sc_ethernet_pcioh.addr,
+ (int)(msc->sc_ethernet_pcioh.addr + msc->sc_modem_pcioh.size - 1));
msc->sc_flags |= MHZC_ETHERNET_MAPPED;