diff options
author | gallatin <gallatin@FreeBSD.org> | 2001-05-27 22:22:03 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2001-05-27 22:22:03 +0000 |
commit | e575dde35923ef7c1d8d571509227ca93b77611c (patch) | |
tree | b5903d5b00e5ca42b1b5fe8168b758d8d3e3e604 /sys/dev/pci/pci.c | |
parent | 7ea800eaa8cbdc20add9f774f6c942d3a47e7560 (diff) | |
download | FreeBSD-src-e575dde35923ef7c1d8d571509227ca93b77611c.zip FreeBSD-src-e575dde35923ef7c1d8d571509227ca93b77611c.tar.gz |
finally fix intr routing on alphas such as the as500 after months of
breakage:
- call PCIB_ROUTE_INTERRUPT() regardless of how valid the intline looks.
Some alphas leave garbage in the intline and leave the intr mapping
to OS platform support routines that map slots/buses to intlines
- Down in the alpha pci code, first try platform.pci_intr_route() and
if it doesn't exist or returns garbage, just read the intline out of
config space.
tested on AS500 (garbage in intline) and UP1000 (PC-like, intline is valid)
Note that a nice little hack like the APIC_IO section of pci_cfgregread()
is not workable. This is because the calling interface for
alpha_pci_route_interrupt() requires us to figure out the bus/slot/etc
from a device_t. At pci_read_device() time, we don't have a device_t
for the bus/slot/func in question.
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r-- | sys/dev/pci/pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 3da4d29..c4b2951 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1207,7 +1207,11 @@ pci_alloc_resource(device_t dev, device_t child, int type, int *rid, * If device doesn't have an interrupt routed, and is deserving of * an interrupt, try to assign it one. */ - if ((type == SYS_RES_IRQ) && (cfg->intline == 255) && (cfg->intpin != 0)) { + if ((type == SYS_RES_IRQ) +#ifndef __alpha__ + && (cfg->intline == 255) && (cfg->intpin != 0) +#endif + ) { cfg->intline = PCIB_ROUTE_INTERRUPT(device_get_parent(dev), child, cfg->intpin); if (cfg->intline != 255) { |