Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pcmcia Make mhzc_alloc_ethernet search the right add...
details: https://anonhg.NetBSD.org/src/rev/4bfbda4dff8e
branches: trunk
changeset: 511963:4bfbda4dff8e
user: uwe <uwe%NetBSD.org@localhost>
date: Sun Jul 01 02:16:25 2001 +0000
description:
Make mhzc_alloc_ethernet search the right address range.
Fixes: kern/11451.
Reviewed by: thorpej
diffstat:
sys/dev/pcmcia/mhzc.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diffs (75 lines):
diff -r 1df7fff91a39 -r 4bfbda4dff8e sys/dev/pcmcia/mhzc.c
--- a/sys/dev/pcmcia/mhzc.c Sun Jul 01 02:13:35 2001 +0000
+++ b/sys/dev/pcmcia/mhzc.c Sun Jul 01 02:16:25 2001 +0000
@@ -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 @@
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 @@
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 @@
}
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 @@
const char *name = aux;
if (pnp)
- printf("%s at %s", name, pnp);
+ printf("%s at %s(*)", name, pnp);
return (UNCONF);
}
@@ -701,6 +702,9 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index