Date: Thu, 11 Nov 1999 21:55:29 -0700 (MST) From: "Kenneth D. Merry" <ken@kdm.org> To: chris@calldei.com Cc: tanimura@r.dl.itc.u-tokyo.ac.jp (Seigo Tanmura), sjr@home.net, freebsd-bugs@FreeBSD.ORG Subject: Re: make_dev() warnings Message-ID: <199911120455.VAA32117@panzer.kdm.org> In-Reply-To: <19991111222829.K48527@holly.calldei.com> from Chris Costello at "Nov 11, 1999 10:28:29 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911120455.VAA32117>