summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-02-26 20:39:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-02-26 20:39:17 +0000
commit82beb2cf97d8e7b5cbd578e477548be4e076f0ff (patch)
treef8791233e0cfb8e0b9debe54f41678fa13a1ae76 /sys/dev/pci
parentd6dd35175ccaf56a6ee14443cff56e0a9de5c026 (diff)
Disable alipm(4) on sparc64 if not running at the recommended 74KHz clock, to
avoid data_access_error exceptions. ok deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/alipm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/pci/alipm.c b/sys/dev/pci/alipm.c
index 56265ed6314..ef362351b88 100644
--- a/sys/dev/pci/alipm.c
+++ b/sys/dev/pci/alipm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alipm.c,v 1.7 2006/02/09 12:16:25 dlg Exp $ */
+/* $OpenBSD: alipm.c,v 1.8 2006/02/26 20:39:16 kettenis Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -207,6 +207,19 @@ alipm_attach(struct device *parent, struct device *self, void *aux)
break;
}
+#ifdef __sparc64__
+ /*
+ * XXX We get data_access_error exceptions on Blade 100 and
+ * Blade 150 machines with 233KHz clock. We should
+ * investigate wether changing the clock speed to 74KHz fixes
+ * the problem.
+ */
+ if ((reg & ALIPM_SMB_HOSTC_CLOCK) != ALIPM_SMB_HOSTC_74K) {
+ printf(", disabling to avoid hardware failure\n");
+ return;
+ }
+#endif
+
printf("\n");
/* Attach I2C bus */