Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2002 04:09:31 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/dev/puc puc.c pucvar.h
Message-ID:  <20020905030030.Y1990-100000@gamplex.bde.org>
In-Reply-To: <200209041529.g84FT5dY078632@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Sep 2002, Poul-Henning Kamp wrote:

> phk         2002/09/04 08:29:04 PDT
>
>   Modified files:
>     sys/dev/puc          puc.c pucvar.h
>   Log:
>   Bring back the PUC_FASTINTR option, and implement it correctly so that
>   child devices also know if they are fast or normal.
>
>   Requested by:   bde

Thanks.

The following untested patch is supposed to fix the case of a normal child
attempting to attach to a fast parent (this shouldn't be permitted, though
it will work if the child is sio since sio's interrupt handler is really
fast even when it it attached as normal.

%%%
Index: puc.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/puc/puc.c,v
retrieving revision 1.15
diff -u -2 -r1.15 puc.c
--- puc.c	4 Sep 2002 15:29:04 -0000	1.15
+++ puc.c	4 Sep 2002 18:03:58 -0000
@@ -164,5 +164,5 @@
 	    INTR_TYPE_TTY | INTR_FAST, puc_intr, sc, &sc->intr_cookie);
 	if (irq_setup == 0)
-		sc->fastintr = 1;
+		sc->fastintr = INTR_FAST;
 	else
 		irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
@@ -462,5 +462,5 @@

 	sc = (struct puc_softc *)device_get_softc(dev);
-	if ((flags & INTR_FAST) && !sc->fastintr)
+	if ((flags & INTR_FAST) != sc->fastintr)
 		return (ENXIO);
 	for (i = 0; PUC_PORT_VALID(sc->sc_desc, i); i++) {
%%%

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020905030030.Y1990-100000>