summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-01-23 18:45:34 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-01-23 18:45:34 +0000
commit457fd1a167983a6521999630c739abdfa2b32158 (patch)
tree847a13ea1ec02af13421dca01f1b7d7b47ee29cf /sys
parent5d158882d84120b27cf026e58eefa31b4c9704cb (diff)
Don't match ITE chips matched by it(4).
tested by jsg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isa/lm_isa.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/isa/lm_isa.c b/sys/dev/isa/lm_isa.c
index 79707c84588..a26eec646cd 100644
--- a/sys/dev/isa/lm_isa.c
+++ b/sys/dev/isa/lm_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm_isa.c,v 1.8 2006/01/17 20:26:37 kettenis Exp $ */
+/* $OpenBSD: lm_isa.c,v 1.9 2006/01/23 18:45:33 kettenis Exp $ */
/* $NetBSD: lm_isa.c,v 1.9 2002/11/15 14:55:44 ad Exp $ */
/*-
@@ -47,6 +47,7 @@
#include <dev/isa/isavar.h>
#include <dev/ic/lm78var.h>
+#include <dev/isa/itvar.h>
/* ISA registers */
#define LMC_ADDR 0x05
@@ -103,6 +104,12 @@ lm_isa_match(struct device *parent, void *match, void *aux)
(!(banksel & 0x80) && vendid == (WB_VENDID_WINBOND & 0xff)))
goto found;
+ /* Probe for ITE chips (and don't attach if we find one). */
+ bus_space_write_1(iot, ioh, LMC_ADDR, ITD_CHIPID);
+ vendid = bus_space_read_1(iot, ioh, LMC_DATA);
+ if (vendid == IT_ID_IT87)
+ goto notfound;
+
/*
* Probe for National Semiconductor LM78/79/81.
*
@@ -126,6 +133,7 @@ lm_isa_match(struct device *parent, void *match, void *aux)
}
}
+ notfound:
bus_space_unmap(iot, ioh, 8);
return (0);