summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-27 21:22:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-27 21:22:37 +0000
commit367698317579e7e93ff7e89fdf045b12948574ea (patch)
treef2470212a1d3ead4c0c6c87dc02b4262ac0bf103 /sys
parent379a4c29a0cd31901b88b1d2d1bf3d5354e5b34e (diff)
more paranoid checking for 47m192
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/i2c_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 259341a4fbf..f52d6f8e908 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.23 2005/12/27 19:46:28 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.24 2005/12/27 21:22:36 deraadt Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -289,7 +289,9 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "adm9240"; /* lm87 clone */
break;
case 0x55:
- if (probe(0x3f) == 0x20)
+ if (probe(0x3f) == 0x20 && (probe(0x47) & 0x70) == 0x00 &&
+ (probe(0x49) & 0xfe) == 0x80 &&
+ (addr & 0x7c) == 0x2c)
name = "47m192"; /* adm1025 compat */
break;
case 0x01: