Change the probe code. You cannot unmap bus space and then use it.

This commit is contained in:
augustss 2002-01-02 12:42:23 +00:00
parent b8467dcaa6
commit c41bbdcea2
4 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aztech.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */
/* $NetBSD: aztech.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */
/* $OpenBSD: aztech.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */
/* $RuOBSD: aztech.c,v 1.11 2001/10/20 13:23:47 pva Exp $ */
@ -121,7 +121,7 @@ az_probe(struct device *parent, struct cfdata *cf, void *aux)
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
u_int r;
int iosize = 1, iobase = ia->ia_iobase;
if (!AZ_BASE_VALID(iobase)) {
@ -132,13 +132,13 @@ az_probe(struct device *parent, struct cfdata *cf, void *aux)
if (bus_space_map(iot, iobase, iosize, 0, &ioh))
return 0;
r = az_find(iot, ioh);
bus_space_unmap(iot, ioh, iosize);
if (!az_find(iot, ioh))
return 0;
ia->ia_iosize = iosize;
return 1;
return (r != 0);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: radiotrack.c,v 1.2 2002/01/02 04:10:02 augustss Exp $ */
/* $NetBSD: radiotrack.c,v 1.3 2002/01/02 12:42:23 augustss Exp $ */
/* $OpenBSD: radiotrack.c,v 1.1 2001/12/05 10:27:06 mickey Exp $ */
/* $RuOBSD: radiotrack.c,v 1.3 2001/10/18 16:51:36 pva Exp $ */
@ -134,7 +134,7 @@ rt_probe(struct device *parent, struct cfdata *cf, void *aux)
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
u_int r;
int iosize = 1, iobase = ia->ia_iobase;
if (!RT_BASE_VALID(iobase)) {
@ -145,13 +145,13 @@ rt_probe(struct device *parent, struct cfdata *cf, void *aux)
if (bus_space_map(iot, iobase, iosize, 0, &ioh))
return 0;
r = rt_find(iot, ioh);
bus_space_unmap(iot, ioh, iosize);
if (!rt_find(iot, ioh))
return 0;
ia->ia_iosize = iosize;
return 1;
return (r != 0);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: radiotrack2.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */
/* $NetBSD: radiotrack2.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */
/* $OpenBSD: radiotrack2.c,v 1.1 2001/12/05 10:27:06 mickey Exp $ */
/* $RuOBSD: radiotrack2.c,v 1.2 2001/10/18 16:51:36 pva Exp $ */
@ -124,7 +124,7 @@ rtii_probe(struct device *parent, struct cfdata *cf, void *aux)
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
u_int r;
int iosize = 1, iobase = ia->ia_iobase;
if (!RTII_BASE_VALID(iobase)) {
@ -135,13 +135,13 @@ rtii_probe(struct device *parent, struct cfdata *cf, void *aux)
if (bus_space_map(iot, iobase, iosize, 0, &ioh))
return 0;
r = rtii_find(iot, ioh);
bus_space_unmap(iot, ioh, iosize);
if (!rtii_find(iot, ioh))
return 0;
ia->ia_iosize = iosize;
return 1;
return (r != 0);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: sf16fmr2.c,v 1.1 2002/01/01 21:51:41 augustss Exp $ */
/* $NetBSD: sf16fmr2.c,v 1.2 2002/01/02 12:42:23 augustss Exp $ */
/* $OpenBSD: sf16fmr2.c,v 1.3 2001/12/18 18:48:08 mickey Exp $ */
/* $RuOBSD: sf16fmr2.c,v 1.12 2001/10/18 16:51:36 pva Exp $ */
@ -124,7 +124,7 @@ sf2r_probe(struct device *parent, struct cfdata *cf, void *aux)
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
u_int r;
int iosize = 1, iobase = ia->ia_iobase;
if (!SF16FMR2_BASE_VALID(iobase)) {
@ -135,13 +135,13 @@ sf2r_probe(struct device *parent, struct cfdata *cf, void *aux)
if (bus_space_map(iot, iobase, iosize, 0, &ioh))
return 0;
r = sf2r_find(iot, ioh);
bus_space_unmap(iot, ioh, iosize);
if (!sf2r_find(iot, ioh))
return 0;
ia->ia_iosize = iosize;
return 1;
return (r != 0);
}
void