From e7a3f1ab4383e0e575c65be1fc3fb6345d1fe122 Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 14 Jun 1997 11:35:37 +0000 Subject: [PATCH] Pass only a subregion of the I/O space to the joy driver, which covers the normal single port. --- sys/arch/i386/isa/joy_isapnp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/isa/joy_isapnp.c b/sys/arch/i386/isa/joy_isapnp.c index b214dc1e9046..8b20133087d2 100644 --- a/sys/arch/i386/isa/joy_isapnp.c +++ b/sys/arch/i386/isa/joy_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: joy_isapnp.c,v 1.1 1997/01/16 23:17:49 christos Exp $ */ +/* $NetBSD: joy_isapnp.c,v 1.2 1997/06/14 11:35:37 mycroft Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -73,6 +73,7 @@ joy_isapnp_attach(parent, self, aux) { struct joy_softc *sc = (struct joy_softc *)self; struct isapnp_attach_args *ipa = aux; + bus_space_handle_t ioh; printf("\n"); @@ -82,8 +83,15 @@ joy_isapnp_attach(parent, self, aux) return; } + if (bus_space_subregion(ipa->ipa_iot, ipa->ipa_io[0].h, 1, 1, + &ioh) < 0) { + printf("%s: error in region allocation\n", + sc->sc_dev.dv_xname); + return; + } + sc->sc_iot = ipa->ipa_iot; - sc->sc_ioh = ipa->ipa_io[0].h; + sc->sc_ioh = ioh; printf("%s: %s %s\n", sc->sc_dev.dv_xname, ipa->ipa_devident, ipa->ipa_devclass);