From efd89902e69344c897e0ab130499f753ab63961e Mon Sep 17 00:00:00 2001 From: bde Date: Fri, 15 Jan 1999 10:00:12 +0000 Subject: 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. --- sys/pci/cy_pci.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sys/pci/cy_pci.c') 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 #include +#include #include #include #include @@ -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. -- cgit v1.1