From bbb83b933acb0a13e61ba44050f77f8e0e885983 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sat, 7 Feb 2004 15:56:58 +0000 Subject: [PATCH] Add a tunable hw.pci_disable_bios_route to work around broken PCI-BIOSes. Many BIOS implementations don't route an interrupt to cardbus bridges by default and some doesn't provide a working call. This results in panics on boot up. For the OLDCARD pcic, it was possible to force the interrupt-less operation, but NEWCARD doesn't have such an option and will never have. --- sys/bus/pci/i386/pci_cfgreg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/bus/pci/i386/pci_cfgreg.c b/sys/bus/pci/i386/pci_cfgreg.c index ed75a895d9..1fb5d1ce97 100644 --- a/sys/bus/pci/i386/pci_cfgreg.c +++ b/sys/bus/pci/i386/pci_cfgreg.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/pci_cfgreg.c,v 1.1.2.7 2001/11/28 05:47:03 imp Exp $ - * $DragonFly: src/sys/bus/pci/i386/pci_cfgreg.c,v 1.5 2004/01/15 08:05:41 joerg Exp $ + * $DragonFly: src/sys/bus/pci/i386/pci_cfgreg.c,v 1.6 2004/02/07 15:56:58 joerg Exp $ * */ @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,11 @@ printf a ; \ } while(0) +static int pci_disable_bios_route = 0; +SYSCTL_INT(_hw, OID_AUTO, pci_disable_bios_route, CTLFLAG_RD, + &pci_disable_bios_route, 0, "disable interrupt routing via PCI-BIOS"); +TUNABLE_INT("hw.pci_disable_bios_route", &pci_disable_bios_route); + static int cfgmech; static int devmax; @@ -324,6 +330,8 @@ pci_cfgintr(int bus, int device, int pin, int oldirq) if (irq == PCI_INVALID_IRQ) break; + if (pci_disable_bios_route != 0) + break; /* * Ask the BIOS to route the interrupt. If we picked an * interrupt that failed, we should really try other -- 2.41.0