From owner-cvs-all Mon Sep 20 15:53: 7 1999 Delivered-To: cvs-all@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 38ADD14F7C; Mon, 20 Sep 1999 15:49:37 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id OAA85503; Mon, 20 Sep 1999 14:44:09 -0700 (PDT) Date: Mon, 20 Sep 1999 14:44:09 -0700 (PDT) From: Julian Elischer To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: devsw registration (modules/newbus/etc.) In-Reply-To: <25218.937863294@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk This is why I asked for some other opinions... we simply disagree on this.. the devsw structure is "one per driver" you don't have one per instance. the make_dev() stuff is a separate issue. That is a 'per device' issue and the aim is that once the whole make_dev() story is played out, the devsw array will not need initialising at all anyhow. But until it is, that way, the driver should do it once on initialisation as part of hooking itself into place. When it becomes un-needed, it can go straight from "done correctly" to "not done at all". I don't like puting it into the wrong place just for the sake of change. On Mon, 20 Sep 1999, Poul-Henning Kamp wrote: > In message , Juli > an Elischer writes: > > >> Why would you want to register a cdevsw until you have found some > >> hardware that need it ? > > > >Because it's part of the driver registration amd not part of the > >individual device registration.. > > Frist remember that cdevsw_add() is destined to be replaced with > make_dev() whereever possible, so that DEVFS has something to work > with. > > Second the devsw should not be registered unless some hardware is > found, another driver might need to register this slot for > compatibilty (ata vs wd driver for instace). > > Third I simply don't agree that registering your cdevsw is part of > the driver registration, in fact, we should move away from that > mistake. > > -- > Poul-Henning Kamp FreeBSD coreteam member > phk@FreeBSD.ORG "Real hackers run -current on their laptop." > FreeBSD -- It will take a long time before progress goes too far! > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message