From owner-cvs-all Tue Oct 9 11: 6: 9 2001 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id C0C1F37B407; Tue, 9 Oct 2001 11:05:59 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [fec0::1:12]) by Awfulhak.org (8.11.6/8.11.6) with ESMTP id f99I5vC02274; Tue, 9 Oct 2001 19:05:58 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.6/8.11.6) with ESMTP id f99I60678296; Tue, 9 Oct 2001 19:06:00 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200110091806.f99I60678296@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John Baldwin Cc: Brian Somers , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, brian@freebsd-services.com Subject: Re: cvs commit: src/sys/i386/isa pcaudio.c In-Reply-To: Message from John Baldwin of "Tue, 09 Oct 2001 10:29:06 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 09 Oct 2001 19:06:00 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On 09-Oct-01 Brian Somers wrote: > >> jhb 2001/10/08 16:35:40 PDT > >> > >> Modified files: > >> sys/i386/isa pcaudio.c > >> Log: > >> Don't attempt to initialize the pcaudio device on open. The attach > >> routine > >> already does the initialization (though it didn't set pca_initialized, so > >> we always initialized twice) and since attach calls make_dev(), there's no > >> way that pcaopen() can be called before pcaattach(). > >> > >> Revision Changes Path > >> 1.63 +1 -7 src/sys/i386/isa/pcaudio.c > > > > Surely pcaopen() can be called before pcaattach() on a non-devfs > > system (or does something else head the call off with an ENXIO) ? > > Wouldn't newbus do the pcaattach() before pcaopen() could possibly ever be > called? Also, how else besides make_dev() does a device associate it's cdevsw > with a major number? Well, I guess nothing's going to get opened 'till cdevsw_add() has been called, but I wasn't paying attention when phk made majors dynamic (proof is in net/if_tun and dev/digi), so I don't know off the top of my head where this is now done. The real reason I posted my message was to weakly assert that something should be ensuring that cdevsw_add() is only called at or after attach time.... > -- > > John Baldwin -- http://www.FreeBSD.org/~jhb/ > PGP Key: http://www.baldwin.cx/~john/pgpkey.asc > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message