summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2006-10-19 03:39:55 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2006-10-19 03:39:55 +0000
commitf9cc6c27b91446ac5248b28e7a0283e2daec3030 (patch)
tree2ca136b580707ca4c3c3a48f89a39be75a9ce12b /sys
parentbcc4457e46925f5d5fc51c98bc5843df3a9069de (diff)
Hack to do pci interrupt number 'fixup'. This is an absolute hack, but for now.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/landisk/landisk/shpcic_machdep.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/landisk/landisk/shpcic_machdep.c b/sys/arch/landisk/landisk/shpcic_machdep.c
index 9cb723f06c5..6093abf6b03 100644
--- a/sys/arch/landisk/landisk/shpcic_machdep.c
+++ b/sys/arch/landisk/landisk/shpcic_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shpcic_machdep.c,v 1.2 2006/10/07 20:52:40 miod Exp $ */
+/* $OpenBSD: shpcic_machdep.c,v 1.3 2006/10/19 03:39:54 drahn Exp $ */
/* $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*
@@ -92,6 +92,15 @@ landisk_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
int pin = pa->pa_intrpin;
int line = pa->pa_intrline;
+ {
+ /* HACK */
+ int dev = pa->pa_device;
+ static const int irq[4] = { 5, 6, 7, 8 };
+
+ if ((dev >= 0 && dev <= 3) && (pin >= 1 && pin <= 4))
+ line = irq[(dev + pin - 1) & 3];
+ }
+
if (pin == 0) {
/* No IRQ used. */
goto bad;