aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/puc/puc.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-09-04 15:29:04 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-09-04 15:29:04 +0000
commitd3c10e33e62906d1a792cfade4d63dd66a466b10 (patch)
tree1fe1bedb5e7328d83657f945afab4afbd123e051 /sys/dev/puc/puc.c
parente7fa55af89be8c37ee53245d7a18070ae56326b2 (diff)
Notes
Diffstat (limited to 'sys/dev/puc/puc.c')
-rw-r--r--sys/dev/puc/puc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 919c3dc5c4ea9..195cb8420331a 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -159,8 +159,18 @@ puc_attach(device_t dev, const struct puc_device_description *desc)
sc->irqres = res;
sc->irqrid = rid;
+#ifdef PUC_FASTINTR
+ irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
+ INTR_TYPE_TTY | INTR_FAST, puc_intr, sc, &sc->intr_cookie);
+ if (irq_setup == 0)
+ sc->fastintr = 1;
+ else
+ irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
+ INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie);
+#else
irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie);
+#endif
if (irq_setup != 0)
return (ENXIO);
@@ -450,9 +460,9 @@ puc_setup_intr(device_t dev, device_t child, struct resource *r, int flags,
int i;
struct puc_softc *sc;
- if (flags & INTR_FAST)
- return (ENXIO);
sc = (struct puc_softc *)device_get_softc(dev);
+ if ((flags & INTR_FAST) && !sc->fastintr)
+ return (ENXIO);
for (i = 0; PUC_PORT_VALID(sc->sc_desc, i); i++) {
if (sc->sc_ports[i].dev == child) {
if (sc->sc_ports[i].ihand != 0)