Date: Sun, 06 Apr 2003 23:00:54 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: mcc@fid4.com Cc: freebsd-mobile@freebsd.org Subject: Re: How to set irq for PCI->PCMCIA adapter Message-ID: <20030406.230054.34511070.imp@bsdimp.com> In-Reply-To: <20030406.224943.53236073.imp@bsdimp.com> References: <3E9015B2.CCD2C126@fid4.com> <20030406.224943.53236073.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Oh, I just reread things. You need a stable patch. Try this one. Warner Index: pci_cfgreg.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/Attic/pci_cfgreg.c,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 pci_cfgreg.c --- pci_cfgreg.c 28 Nov 2001 05:47:03 -0000 1.1.2.7 +++ pci_cfgreg.c 7 Apr 2003 05:02:41 -0000 @@ -35,6 +35,7 @@ #include <sys/kernel.h> #include <sys/module.h> #include <sys/malloc.h> +#include <sys/sysctl.h> #include <vm/vm.h> #include <vm/pmap.h> #include <machine/md_var.h> @@ -67,6 +68,16 @@ static struct PIR_table *pci_route_table; static int pci_route_count; +/* sysctl vars */ +SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI Bus parameters"); + +static uint32_t pci_irq_override_mask = 0xdef4; +TUNABLE_INT("hw.pci.irq_override_mask", &pci_irq_override_mask); +SYSCTL_INT(_hw_pci, OID_AUTO, irq_override_mask, CTLFLAG_RD, + &pci_irq_override_mask, 0xdef4, + "Mask of allowed irqs to try to route when it has no good clue about\n" + "which irqs it should use."); + static u_int16_t pcibios_get_version(void) { @@ -413,7 +434,8 @@ /* life is tough, so just pick an interrupt */ for (irq = 0; irq < 16; irq++) { ibit = (1 << irq); - + if ((ibit & pci_irq_override_mask) == 0) + continue; if (pe->pe_intpin[pin - 1].irqs & ibit) { PRVERB(("pci_cfgintr_virgin: using routable interrupt %d\n", irq)); return(irq);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030406.230054.34511070.imp>