summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev/zs.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-19 22:42:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-19 22:42:36 +0000
commit2adb8abd14131e004d6818c69ce4a4ce93e069c3 (patch)
tree6b2a0a8ba03704b5525920ed2fec866f1e94f4a0 /sys/arch/macppc/dev/zs.c
parent2cd40ea3242768ef89d856c7a9788bbc472b3c28 (diff)
Be more strict in the probe routines and actually check ca_nintr and
ca_nreg are large enough for our greedy needs; tweaks and ok kettenis@
Diffstat (limited to 'sys/arch/macppc/dev/zs.c')
-rw-r--r--sys/arch/macppc/dev/zs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c
index 111dc6afaa2..35289f89299 100644
--- a/sys/arch/macppc/dev/zs.c
+++ b/sys/arch/macppc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.12 2006/01/09 20:57:00 miod Exp $ */
+/* $OpenBSD: zs.c,v 1.13 2006/06/19 22:42:33 miod Exp $ */
/* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */
/*
@@ -193,6 +193,9 @@ zsc_match(struct device *parent, void *match, void *aux)
if (strcmp(ca->ca_name, "escc") != 0)
return 0;
+ if (ca->ca_nreg < 8)
+ return 0;
+
if (cf->cf_unit > 1)
return 0;