diff options
author | bde <bde@FreeBSD.org> | 1999-01-15 10:00:12 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-15 10:00:12 +0000 |
commit | efd89902e69344c897e0ab130499f753ab63961e (patch) | |
tree | afdeaf055dd51acae55d1045b318d85abe14c24c /sys/pci/cy_pci.c | |
parent | 836496c3c77585a9603b1ce20cc257c7eb818729 (diff) | |
download | FreeBSD-src-efd89902e69344c897e0ab130499f753ab63961e.zip FreeBSD-src-efd89902e69344c897e0ab130499f753ab63961e.tar.gz |
Use a fast interrupt handler for the PCI version of the cy driver
if option CY_PCI_FASTINTR is configured and mapping the irq to a
fastintr is possible. Unfortunately, this has to be optional because
pci_map_int_right() doesn't handle the INTR_EXCL flag right --
INTR_EXCL is honoured even if the interrupt needs to be non-exclusive
for other devices to work.
Diffstat (limited to 'sys/pci/cy_pci.c')
-rw-r--r-- | sys/pci/cy_pci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/pci/cy_pci.c b/sys/pci/cy_pci.c index 4f1b8b7..7113155 100644 --- a/sys/pci/cy_pci.c +++ b/sys/pci/cy_pci.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cy_pci.c,v 1.8 1999/01/11 23:35:01 bde Exp $ + * $Id: cy_pci.c,v 1.9 1999/01/11 23:43:54 bde Exp $ */ /* @@ -34,8 +34,11 @@ #include "pci.h" #if NPCI > 0 +#include "opt_cy_pci_fastintr.h" + #include <sys/param.h> #include <sys/systm.h> +#include <sys/interrupt.h> #include <sys/kernel.h> #include <vm/vm.h> #include <vm/pmap.h> @@ -112,10 +115,18 @@ cy_attach(config_id, unit) * since the ISA driver must handle the interrupt anyway, we use * the unit number as the token even for PCI. */ - if (!pci_map_int(config_id, (pci_inthand_t *)cyintr, (void *)adapter, &tty_imask)) { + if ( +#ifdef CY_PCI_FASTINTR + !pci_map_int_right(config_id, (pci_inthand_t *)cyintr, + (void *)adapter, &tty_imask, + INTR_EXCL | INTR_FAST) && +#endif + !pci_map_int_right(config_id, (pci_inthand_t *)cyintr, + (void *)adapter, &tty_imask, 0)) { printf("cy%d: couldn't map interrupt\n", unit); goto fail; } + /* * Enable the "local" interrupt input to generate a * PCI interrupt. |