From owner-freebsd-bugs Thu Nov 11 20:14:52 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 6E19014E99 for ; Thu, 11 Nov 1999 20:14:48 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id VAA31806; Thu, 11 Nov 1999 21:14:04 -0700 (MST) (envelope-from ken) Message-Id: <199911120414.VAA31806@panzer.kdm.org> Subject: Re: make_dev() warnings In-Reply-To: <199911120403.NAA10934@rina.r.dl.itc.u-tokyo.ac.jp> from Seigo Tanimura at "Nov 12, 1999 01:03:54 pm" To: tanimura@r.dl.itc.u-tokyo.ac.jp (Seigo Tanimura) Date: Thu, 11 Nov 1999 21:14:04 -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 [ Your character set is kinda screwed up. A lot of the stuff below came out as 8-bit characters... ] Seigo Tanimura wrote... [Charset iso-2022-jp-2 unsupported, filtering to ASCII...] > On Thu, 11 Nov 1999 21:40:33 -0600, > Chris Costello said: > > >> WARNING: driver xpt should register devices with make_dev() (dev_t = "#xpt/0") > >> WARNING: driver pass should register devices with make_dev() (dev_t = "#pass/0") > >> > >> Is this something that I should send-pr, or are these being worked on? > > chris> They're things that should be using make_dev(9) instead of > chris> whatever it is they're using. > > chris> If you want to submit a patch for those CAM devices to use > chris> make_dev, go right ahead! > > > It would help to add a new argument to .TNpNeNrNiNpNhN_NiNnNiNtN_Nt, so that a unit > number(or a periph?) can be passed from .TNsNyNsN/NcNaNmN/NcNaNmN_NxNpNtN.Nc:NxNpNtN_NfNiNnNiNsNhNcNoNnNfNiNg() > to .TNsNyNsN/NcNaNmN/NcNaNmN_NxNpNtN.Nc:NxNpNtN_NpNeNrNiNpNhN_NiNnNiNt() 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. (Assuming that's what you're proposing above -- I can't tell) That's a good idea, and I even considered doing it that way. Unfortunately, it's difficult to come up with a one-size-fits-all approach, since make_dev() will have to be called once for every /dev entry at some point in the future. At present, there are a couple of reasons not to do it: - the disk code already creates dev entries for the CD and DA drivers - the sa and target drivers have multiple minor device nodes, and the sa(4) driver in particular has a large number of minor entries, and a weird minor numbering scheme In any case, I've got patches here: http://www.FreeBSD.ORG/~ken/cam.make_dev.diffs.110899 Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message