summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>1998-04-01 21:07:37 +0000
committerTor Egge <tegge@FreeBSD.org>1998-04-01 21:07:37 +0000
commit5758c2de94dafd19a144039cb0a2b7f62196fae7 (patch)
treedf5d22c731fbeff7db5b4ca54307272883f66d32 /sys/dev/pci
parent300e9a7696dceecb6d5684aee4b634da021d9bdc (diff)
Notes
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 6ecd4b78b1fe..530408b87963 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pci.c,v 1.80 1997/11/07 08:53:28 phk Exp $
+ * $Id: pci.c,v 1.81 1998/01/24 02:54:47 eivind Exp $
*
*/
@@ -340,9 +340,25 @@ pci_readcfg(pcicfgregs *probe)
int airq;
airq = pci_apic_pin(cfg->bus, cfg->slot, cfg->intpin);
- if ((airq >= 0) && (airq != cfg->intline)) {
- undirect_pci_irq(cfg->intline);
- cfg->intline = airq;
+ if (airq >= 0) {
+ /* PCI specific entry found in MP table */
+ if (airq != cfg->intline) {
+ undirect_pci_irq(cfg->intline);
+ cfg->intline = airq;
+ }
+ } else {
+ /*
+ * PCI interrupts might be redirected to the
+ * ISA bus according to some MP tables. Use the
+ * same methods as used by the ISA devices
+ * devices to find the proper IOAPIC int pin.
+ */
+ airq = isa_apic_pin(cfg->intline);
+ if ((airq >= 0) && (airq != cfg->intline)) {
+ /* XXX: undirect_pci_irq() ? */
+ undirect_isa_irq(cfg->intline);
+ cfg->intline = airq;
+ }
}
}
#endif /* APIC_IO */