Date: Wed, 5 Jul 1995 13:48:50 +1000 From: Bruce Evans <bde@zeta.org.au> To: davidg@Root.COM, jmb@kryten.atinc.com Cc: hackers@FreeBSD.org Subject: Re: splnet and if_ep.c Message-ID: <199507050348.NAA14946@godzilla.zeta.org.au>
next 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. Yes, splnet is a _lower_ priority than splimp and probably should never be used in the hardware parts of network drivers. It is only used in if_zp.c (among network card drivers) and that use seems to be a bug. The networking part of lpt.c seems to have a bug in the opposite direction. It uses splclock() instead of splimp() so it may break clock interrupt handling. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507050348.NAA14946>