Date: Wed, 5 Jul 1995 00:09:26 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: davidg@Root.COM Cc: jmb@kryten.atinc.com, hackers@freebsd.org Subject: Re: splnet and if_ep.c Message-ID: <199507050709.AAA02061@gndrsh.aac.dev.com> In-Reply-To: <199507050252.TAA10682@corbin.Root.COM> from "David Greenman" at Jul 4, 95 07:52:07 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507050709.AAA02061>