summaryrefslogtreecommitdiffstats
path: root/sys/alpha/mcbus
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-07-13 03:45:11 +0000
committermjacob <mjacob@FreeBSD.org>2000-07-13 03:45:11 +0000
commit6ebbbb92bd7a831548414e4b56858177763f7b7e (patch)
treec3796708487c25f93d2ac540e4b4559ad17c6afe /sys/alpha/mcbus
parentc956469da1a8f1493c62197b61a26c970e184210 (diff)
downloadFreeBSD-src-6ebbbb92bd7a831548414e4b56858177763f7b7e.zip
FreeBSD-src-6ebbbb92bd7a831548414e4b56858177763f7b7e.tar.gz
Handle (for now) trivial one level bridge case so we can get the
slot that the bridge happens to be in so we get interrupts working on bridged cards.
Diffstat (limited to 'sys/alpha/mcbus')
-rw-r--r--sys/alpha/mcbus/mcpcia.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/alpha/mcbus/mcpcia.c b/sys/alpha/mcbus/mcpcia.c
index ff7441f..2bf987d 100644
--- a/sys/alpha/mcbus/mcpcia.c
+++ b/sys/alpha/mcbus/mcpcia.c
@@ -618,6 +618,14 @@ mcpcia_setup_intr(device_t dev, device_t child, struct resource *ir, int flags,
mid = mcbus_get_mid(dev);
gid = mcbus_get_gid(dev);
+ if (slot == 0) {
+ device_t bdev;
+ /* bridged - get slot from granparent */
+ /* note that this is broken for all but the most trival case */
+ bdev = device_get_parent(device_get_parent(child));
+ slot = pci_get_slot(bdev);
+ }
+
if (mid == 5 && slot == 1) {
irq = 16; /* MID 5, slot 1, is the internal NCR 53c810 */
} else if (slot >= 2 && slot <= 5) {
OpenPOWER on IntegriCloud