From owner-freebsd-bugs Thu Nov 11 20:56: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 0895314EFD for ; Thu, 11 Nov 1999 20:56:01 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id VAA32117; Thu, 11 Nov 1999 21:55:29 -0700 (MST) (envelope-from ken) Message-Id: <199911120455.VAA32117@panzer.kdm.org> Subject: Re: make_dev() warnings In-Reply-To: <19991111222829.K48527@holly.calldei.com> from Chris Costello at "Nov 11, 1999 10:28:29 pm" To: chris@calldei.com Date: Thu, 11 Nov 1999 21:55:29 -0700 (MST) Cc: tanimura@r.dl.itc.u-tokyo.ac.jp (Seigo Tanmura), sjr@home.net, freebsd-bugs@FreeBSD.ORG From: "Kenneth D. Merry" X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Chris Costello wrote... > On Thu, Nov 11, 1999, Kenneth D. Merry wrote: > > [8-bit fixed.] > > > > It would help to add a new argument to periph_init_t, so that a unit > > > number(or a periph?) can be passed from sys/cam/cam_xpt.c:xpt_finishconfig() > > > to sys/cam/cam_xpt.c:xpt_periph_init() and the other functions. None > > > of the CAM drivers seem to call make_dev(). > > > > If I can decipher what you're saying there, I think you're talking about > > probably having cam_periph_alloc() or something similar allocate the dev_t > > node at attach time. > > Hopefully that cleared it up. Yes, that's better, thanks. To answer the question -- I think that make_dev(), unlike cdevsw_add(), should probably be called in the peripheral driver's register routine. The reason is that from what I can tell, those two functions will eventually have different purposes. cdevsw_add() just adds hooks for a major number, but make_dev() will actually add device nodes. (i.e., major/minor pairs) So while cdevsw_add() need only be called once for each device type, make_dev() (once we get DEVFS, I imagine) will probably have to be called once for each device node added. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message