From owner-freebsd-hackers Fri Jan 3 10:54:54 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA07745 for hackers-outgoing; Fri, 3 Jan 1997 10:54:54 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id KAA07738 for ; Fri, 3 Jan 1997 10:54:52 -0800 (PST) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id KAA02508 for ; Fri, 3 Jan 1997 10:54:50 -0800 (PST) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.8.2/8.8.2) with SMTP id KAA08548; Fri, 3 Jan 1997 10:48:34 -0800 (PST) Message-ID: <32CD5439.2781E494@whistle.com> Date: Fri, 03 Jan 1997 10:47:21 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Bruce Evans CC: brawley@communica.com.au, hackers@FreeBSD.ORG Subject: Re: Device driver initialisation References: <199701030933.UAA26540@godzilla.zeta.org.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I think it's the bdev case that's broken. Drivers should add entries to > the devswitches themselves in all cases. In 2.2., non-lkm drivers have to > do this, so doing it differently for the lkm case just requires more code. > Most drivers do it in a poor way using SYSINIT(). This also requires more > code and gives worse results than adding the entries at the appropriate > time (several drivers have active devswitch entries although their probe > has failed, and open routines that can't handle being called when the > driver hasn't been attached). I agree.. The SYSINIT method was used to make the implimentation quicker. most drivers should grow an 'init routine' that is called in both the LKM and linked cases the mechanism to do so is not decided yet however. maybe we should have a little SIG on this some time..