diff options
author | Oleg Safiullin <form@cvs.openbsd.org> | 2007-12-24 14:07:48 +0000 |
---|---|---|
committer | Oleg Safiullin <form@cvs.openbsd.org> | 2007-12-24 14:07:48 +0000 |
commit | ea686c954f3d7040d88656349e8f8bade7974ad7 (patch) | |
tree | c4edc784bfc641b1ba55824c6b3f82399da2534f /sys/dev/isa | |
parent | 779268af2aa12076e87aec9b1ed3502f81f8bd33 (diff) |
alwais unmap i/o space in it_match
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/it.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/isa/it.c b/sys/dev/isa/it.c index a6c965c5012..11707b69918 100644 --- a/sys/dev/isa/it.c +++ b/sys/dev/isa/it.c @@ -1,4 +1,4 @@ -/* $OpenBSD: it.c,v 1.26 2007/12/23 17:44:07 form Exp $ */ +/* $OpenBSD: it.c,v 1.27 2007/12/24 14:07:47 form Exp $ */ /* * Copyright (c) 2007 Oleg Safiullin <form@pdp-11.org.ru> @@ -118,14 +118,17 @@ it_match(struct device *parent, void *match, void *aux) return (0); } - /* check for ITE vendor ID */ + /* get vendor id */ bus_space_write_1(ia->ia_iot, ioh, IT_EC_ADDR, IT_EC_VENDID); - if (bus_space_read_1(ia->ia_iot, ioh, IT_EC_DATA) != IT_VEND_ITE) - return (0); + cr = bus_space_read_1(ia->ia_iot, ioh, IT_EC_DATA); /* unmap EC i/o space */ bus_space_unmap(ia->ia_iot, ioh, 8); + /* check for ITE vendor ID */ + if (cr != IT_VEND_ITE) + return (0); + /* map i/o space */ if (bus_space_map(ia->ia_iot, IO_IT, 2, 0, &ioh) != 0) { DPRINTF(("it_probe: can't map i/o space")); |