From owner-freebsd-hackers Tue Jul 4 21:07:12 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA01799 for hackers-outgoing; Tue, 4 Jul 1995 21:07:12 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id VAA01785 for ; Tue, 4 Jul 1995 21:06:55 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id NAA14946; Wed, 5 Jul 1995 13:48:50 +1000 Date: Wed, 5 Jul 1995 13:48:50 +1000 From: Bruce Evans Message-Id: <199507050348.NAA14946@godzilla.zeta.org.au> To: davidg@Root.COM, jmb@kryten.atinc.com Subject: Re: splnet and if_ep.c Cc: hackers@FreeBSD.org 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. 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