1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

Don't call the bios if the interrupt appaers to be already routed. Some

older PCI BIOSes hate this and this leads to panics when it is done.  Also,
assume that a uniquely routed interrupt is already routed.  This also
seems to help some older laptops with feable BIOSes cope.
This commit is contained in:
Warner Losh 2002-03-16 23:02:41 +00:00
parent 048d9f99d1
commit 654d58ca24
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92458
3 changed files with 9 additions and 9 deletions

View File

@ -267,10 +267,10 @@ pci_cfgintr(int bus, int device, int pin)
continue;
irq = pci_cfgintr_linked(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_unique(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_virgin(pe, pin);
if (irq == 255)
@ -282,7 +282,7 @@ pci_cfgintr(int bus, int device, int pin)
args.eax = PCIBIOS_ROUTE_INTERRUPT;
args.ebx = (bus << 8) | (device << 3);
args.ecx = (irq << 8) | (0xa + pin - 1); /* pin value is 0xa - 0xd */
if (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL)) && !already) {
if (!already && bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL))) {
/*
* XXX if it fails, we should try to smack the router
* hardware directly.

View File

@ -267,10 +267,10 @@ pci_cfgintr(int bus, int device, int pin)
continue;
irq = pci_cfgintr_linked(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_unique(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_virgin(pe, pin);
if (irq == 255)
@ -282,7 +282,7 @@ pci_cfgintr(int bus, int device, int pin)
args.eax = PCIBIOS_ROUTE_INTERRUPT;
args.ebx = (bus << 8) | (device << 3);
args.ecx = (irq << 8) | (0xa + pin - 1); /* pin value is 0xa - 0xd */
if (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL)) && !already) {
if (!already && bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL))) {
/*
* XXX if it fails, we should try to smack the router
* hardware directly.

View File

@ -267,10 +267,10 @@ pci_cfgintr(int bus, int device, int pin)
continue;
irq = pci_cfgintr_linked(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_unique(pe, pin);
if (irq != 255)
already = 1;
if (irq == 255)
irq = pci_cfgintr_virgin(pe, pin);
if (irq == 255)
@ -282,7 +282,7 @@ pci_cfgintr(int bus, int device, int pin)
args.eax = PCIBIOS_ROUTE_INTERRUPT;
args.ebx = (bus << 8) | (device << 3);
args.ecx = (irq << 8) | (0xa + pin - 1); /* pin value is 0xa - 0xd */
if (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL)) && !already) {
if (!already && bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL))) {
/*
* XXX if it fails, we should try to smack the router
* hardware directly.