From owner-freebsd-hackers Wed Jul 5 00:09:24 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA05869 for hackers-outgoing; Wed, 5 Jul 1995 00:09:24 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA05863 for ; Wed, 5 Jul 1995 00:09:21 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id AAA02061; Wed, 5 Jul 1995 00:09:26 -0700 From: "Rodney W. Grimes" Message-Id: <199507050709.AAA02061@gndrsh.aac.dev.com> Subject: Re: splnet and if_ep.c To: davidg@Root.COM Date: Wed, 5 Jul 1995 00:09:26 -0700 (PDT) Cc: jmb@kryten.atinc.com, hackers@freebsd.org In-Reply-To: <199507050252.TAA10682@corbin.Root.COM> from "David Greenman" at Jul 4, 95 07:52:07 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1415 Sender: hackers-owner@freebsd.org Precedence: bulk > > >the 3c509 is reported to be buggy. though i have not had any problems > >with it. however, if writing smcioctl() for the smc91c92 chip, i see > >that if_ze.c:ze_ioctl() calls splnet() at entry. if_ep.c:ep_ioctl() does > >not. anybody seen any problems with the ix or zp drivers? from grep's > >it appears that splnet is a higher priority than splimp. > > In general, the ioctl routines of the drivers should be protected with > splimp(). This is because they often write to device registers or modify the > board state in some other way that must not be interrupted. > > >if_ep.c -- > > The 'ep' driver appears to be safe in all cases except one. The case of it > setting the interface down (via ep_stop) [when IFF_UP is cleared], is not > protected yet it modifies several important device registers. This means that > if a packet interrupt arrives while you are doing this, you'll likely lose. In > all the other cases, the routines that each of the ioctl's call are themselves > protected with splimp(). > I haven't looked at the other drivers (yet?). Someone definately should. The if_ix driver has problems in this area, I have slatted it for a self code review. ixinit is one that I know needs one, and probably ixstop. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD