From owner-freebsd-current Sun Jul 25 12: 4:53 1999 Delivered-To: freebsd-current@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 6062B1522F for ; Sun, 25 Jul 1999 12:04:48 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id FAA12887; Mon, 26 Jul 1999 05:04:42 +1000 Date: Mon, 26 Jul 1999 05:04:42 +1000 From: Bruce Evans Message-Id: <199907251904.FAA12887@godzilla.zeta.org.au> To: bde@zeta.org.au, nsouch@teaser.fr Subject: Re: PLIP is still broken :( Cc: current@FreeBSD.ORG, des@flood.ping.uio.no, obrien@NUXI.com, sobomax@altavista.net Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>Otherwise, >>the generic code is missing mainly update of the interrupt masks when >>an interrupt is unregistered. > >For the low level side, we could consider something like the following code. >But this shall be called by the nexus layer and then needs generic newbus >support (as you said above, didn't you?). >/* > * Switch an irq from a maskptr to another without unregistering the irq > * handler. > * This function is supposed to work with only one handler per irq. > */ >void >switch_masks(intrmask_t *oldmaskptr, intrmask_t *newmaskptr, int irq) ... I don't like most of this. Driver level code won't even know the correct maskptrs. (irq, maskptr) pairs depend on i386 implementation details for uniqueness. Use { s = splhigh(); BUS_TEARDOWN_INTR(...); BUS_SETUP_INTR(...); splx(s); } until/unless the newbus level provides a better interface. The problem with the masks not being updated when interrupts are unregistered should be fixed in update*_masks(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message