From owner-freebsd-bugs Thu Nov 11 21:40:33 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 D83801541B for ; Thu, 11 Nov 1999 21:40:29 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id WAA32579; Thu, 11 Nov 1999 22:40:12 -0700 (MST) (envelope-from ken) Message-Id: <199911120540.WAA32579@panzer.kdm.org> Subject: Re: make_dev() warnings In-Reply-To: <199911120524.OAA11399@rina.r.dl.itc.u-tokyo.ac.jp> from Seigo Tanimura at "Nov 12, 1999 02:24:30 pm" To: tanimura@r.dl.itc.u-tokyo.ac.jp (Seigo Tanimura) Date: Thu, 11 Nov 1999 22:40:12 -0700 (MST) Cc: chris@calldei.com, 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 Seigo Tanimura wrote... > On Thu, 11 Nov 1999 21:14:04 -0700 (MST), > "Kenneth D. Merry" said: > >> 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(). > > ken> If I can decipher what you're saying there, I think you're talking about > ken> probably having cam_periph_alloc() or something similar allocate the dev_t > ken> node at attach time. > > Yes, that is my main idea. > > > ken> - the sa and target drivers have multiple minor device nodes, and the > ken> sa(4) driver in particular has a large number of minor entries, and a > ken> weird minor numbering scheme > > pcm(4) has several minor numbers as well. It simply calls make_dev() for > each of mixer, audio, dsp and dspW. Could the number of the minor entries > for sa(4) depend on a drive? The minor numbers for sa(4) are the same for each drive. The problem is that the minor number scheme for sa(4) isn't the same as the minor number scheme for pass(4), which isn't the same as the scheme for the target driver. In other words, there's no clean way to have a common set of make_dev() code for all CAM peripheral drivers. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message