summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-10-22 21:25:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-10-22 21:25:03 +0000
commit9de473a7eeed9561dfab945b363fa45ed2758562 (patch)
tree82466eb88f1bd4c3b31d0aed5409abf43a7fc218 /sys/arch
parent8b0b911d3f46d5ce012a26afd69e76cc9d1484fd (diff)
Make sure we use the corrrect interrupt line on Shasta.
ok drahn@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/pci/kauaiata.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/arch/macppc/pci/kauaiata.c b/sys/arch/macppc/pci/kauaiata.c
index 0cf19c6248e..c1bd76d7c81 100644
--- a/sys/arch/macppc/pci/kauaiata.c
+++ b/sys/arch/macppc/pci/kauaiata.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kauaiata.c,v 1.5 2005/10/07 17:21:12 deraadt Exp $ */
+/* $OpenBSD: kauaiata.c,v 1.6 2005/10/22 21:25:02 kettenis Exp $ */
/*
* Copyright (c) 2003 Dale Rahn
@@ -114,11 +114,19 @@ kauaiataattach(struct device *parent, struct device *self, void *aux)
ca.ca_nreg = OF_getprop(node, "reg", reg, sizeof(reg));
- intr[0] = PCI_INTERRUPT_LINE(pci_conf_read(pc, pa->pa_tag,
- PCI_INTERRUPT_REG));
- ca.ca_nintr = 4; /* claim to have 4 bytes of interrupt info */
- /* This needs to come from INTERRUPT REG above, but is not filled out */
- intr[0] = 0x27;
+ /*
+ * The PCI Interrupt Configuration Registers seems to be
+ * hardwired to 0. Get the interrupt line from OpenFirmware.
+ */
+ /* XXX */
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_APPLE &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_ATA) {
+ ca.ca_nintr = OF_getprop(node, "interrupts",
+ intr, sizeof intr);
+ } else {
+ ca.ca_nintr = 4;
+ intr[0] = 0x27;
+ }
namelen = OF_getprop(node, "name", name, sizeof(name));
if ((namelen < 0) || (namelen >= sizeof(name))) {