Date: Tue, 09 Oct 2001 19:06:00 +0100 From: Brian Somers <brian@freebsd-services.com> To: John Baldwin <jhb@FreeBSD.org> Cc: Brian Somers <brian@freebsd-services.com>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, brian@freebsd-services.com Subject: Re: cvs commit: src/sys/i386/isa pcaudio.c Message-ID: <200110091806.f99I60678296@hak.lan.Awfulhak.org> In-Reply-To: Message from John Baldwin <jhb@FreeBSD.org> of "Tue, 09 Oct 2001 10:29:06 PDT." <XFMail.011009102906.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <jhb@FreeBSD.org> -- 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 <brian@freebsd-services.com> <brian@Awfulhak.org> http://www.freebsd-services.com/ <brian@[uk.]FreeBSD.org> Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110091806.f99I60678296>