Don't initialize softc's space tags/handles until isapnp_config() has
been called. Pointed out by Lennart Augustsson.
This commit is contained in:
parent
f1170022ce
commit
985f99fe00
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ep_isapnp.c,v 1.10 1997/10/28 21:27:59 christos Exp $ */
|
||||
/* $NetBSD: if_ep_isapnp.c,v 1.11 1997/12/17 01:31:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Jonathan Stone <jonathan@NetBSD.org>
|
||||
@ -119,10 +119,6 @@ ep_isapnp_attach(parent, self, aux)
|
||||
|
||||
printf("\n");
|
||||
|
||||
sc->sc_iot = ipa->ipa_iot;
|
||||
sc->sc_ioh = ipa->ipa_io[0].h;
|
||||
sc->bustype = EP_BUS_ISA;
|
||||
|
||||
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||
printf("%s: error in region allocation\n", sc->sc_dev.dv_xname);
|
||||
return;
|
||||
@ -131,6 +127,10 @@ ep_isapnp_attach(parent, self, aux)
|
||||
printf("%s: %s %s\n", sc->sc_dev.dv_xname, ipa->ipa_devident,
|
||||
ipa->ipa_devclass);
|
||||
|
||||
sc->sc_iot = ipa->ipa_iot;
|
||||
sc->sc_ioh = ipa->ipa_io[0].h;
|
||||
sc->bustype = EP_BUS_ISA;
|
||||
|
||||
sc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num,
|
||||
ipa->ipa_irq[0].type, IPL_NET, epintr, sc);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_le_isapnp.c,v 1.6 1997/10/28 21:28:03 christos Exp $ */
|
||||
/* $NetBSD: if_le_isapnp.c,v 1.7 1997/12/17 01:31:59 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -203,6 +203,12 @@ le_isapnp_attach(parent, self, aux)
|
||||
bus_dma_segment_t seg;
|
||||
int i, rseg;
|
||||
|
||||
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||
printf("%s: error in region allocation\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return;
|
||||
}
|
||||
|
||||
lesc->sc_iot = iot = ipa->ipa_iot;
|
||||
lesc->sc_ioh = ioh = ipa->ipa_io[0].h;
|
||||
lesc->sc_dmat = dmat = ipa->ipa_dmat;
|
||||
@ -210,12 +216,6 @@ le_isapnp_attach(parent, self, aux)
|
||||
lesc->sc_rap = PCNET_RAP;
|
||||
lesc->sc_rdp = PCNET_RDP;
|
||||
|
||||
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||
printf("%s: error in region allocation\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract the physical MAC address from the ROM.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ne_isapnp.c,v 1.2 1997/10/28 21:28:06 christos Exp $ */
|
||||
/* $NetBSD: if_ne_isapnp.c,v 1.3 1997/12/17 01:32:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -152,9 +152,9 @@ ne_isapnp_attach(
|
||||
struct ne2000_softc * const nsc = &isc->sc_ne2000;
|
||||
struct dp8390_softc * const dsc = &nsc->sc_dp8390;
|
||||
struct isapnp_attach_args * const ipa = aux;
|
||||
const bus_space_tag_t nict = ipa->ipa_iot;
|
||||
const bus_space_handle_t nich = ipa->ipa_io[0].h;
|
||||
bus_space_tag_t asict = nict;
|
||||
bus_space_tag_t nict;
|
||||
bus_space_handle_t nich;
|
||||
bus_space_tag_t asict;
|
||||
bus_space_handle_t asich;
|
||||
const char *typestr;
|
||||
|
||||
@ -166,6 +166,11 @@ ne_isapnp_attach(
|
||||
return;
|
||||
}
|
||||
|
||||
nict = ipa->ipa_iot;
|
||||
nich = ipa->ipa_io[0].h;
|
||||
|
||||
asict = nict;
|
||||
|
||||
if (bus_space_subregion(nict, nich, NE2000_ASIC_OFFSET,
|
||||
NE2000_ASIC_NPORTS, &asich)) {
|
||||
printf("%s: can't subregion i/o space\n", dsc->sc_dev.dv_xname);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sb_isapnp.c,v 1.17 1997/11/30 15:13:32 drochner Exp $ */
|
||||
/* $NetBSD: sb_isapnp.c,v 1.18 1997/12/17 01:32:01 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -122,6 +122,13 @@ sb_isapnp_attach(parent, self, aux)
|
||||
struct sbdsp_softc *sc = (struct sbdsp_softc *)self;
|
||||
struct isapnp_attach_args *ipa = aux;
|
||||
|
||||
printf("\n");
|
||||
|
||||
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||
printf("%s: error in region allocation\n", sc->sc_dev.dv_xname);
|
||||
return;
|
||||
}
|
||||
|
||||
sc->sc_ic = ipa->ipa_ic;
|
||||
|
||||
sc->sc_iot = ipa->ipa_iot;
|
||||
@ -145,13 +152,6 @@ sb_isapnp_attach(parent, self, aux)
|
||||
*/
|
||||
sc->sc_isa = parent->dv_parent;
|
||||
|
||||
printf("\n");
|
||||
|
||||
if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
|
||||
printf("%s: error in region allocation\n", sc->sc_dev.dv_xname);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sbmatch(sc)) {
|
||||
printf("%s: sbmatch failed\n", sc->sc_dev.dv_xname);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user