Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 1999 21:14:04 -0700 (MST)
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        tanimura@r.dl.itc.u-tokyo.ac.jp (Seigo Tanimura)
Cc:        chris@calldei.com, sjr@home.net, freebsd-bugs@FreeBSD.ORG
Subject:   Re: make_dev() warnings
Message-ID:  <199911120414.VAA31806@panzer.kdm.org>
In-Reply-To: <199911120403.NAA10934@rina.r.dl.itc.u-tokyo.ac.jp> from Seigo Tanimura at "Nov 12, 1999 01:03:54 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
[ 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 <chris@calldei.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911120414.VAA31806>