From owner-cvs-all Wed Sep 4 11: 2:19 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8CFF37B400; Wed, 4 Sep 2002 11:02:11 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B48C43E42; Wed, 4 Sep 2002 11:02:10 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA18846; Wed, 4 Sep 2002 18:02:07 GMT Date: Thu, 5 Sep 2002 04:09:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/dev/puc puc.c pucvar.h In-Reply-To: <200209041529.g84FT5dY078632@freefall.freebsd.org> Message-ID: <20020905030030.Y1990-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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