Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2000 09:52:46 -0700
From:      Warner Losh <imp@village.org>
To:        Robert Lipe <robertlipe@usa.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: pci bus enumeration & cdevsw indexing 
Message-ID:  <200011131652.eADGqkG40565@billy-club.village.org>
In-Reply-To: Your message of "Mon, 13 Nov 2000 00:44:10 CST." <20001113004410.W20018@rjlhome.sco.com> 
References:  <20001113004410.W20018@rjlhome.sco.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20001113004410.W20018@rjlhome.sco.com> Robert Lipe writes:
: Is there a "normal" way for a conforming driver to walk the busses,
: pluck out bus number, slot number, device id, subsystem id, and all that
: traditional stuff, or do I just need to carve up pci.c and build my own
: interface to do it?

You may need to carve up pci.c, but there will likely be resistance to
such a change.  You rarely, if ever, need to do this from a driver.

: Also, I have a question on loadable character devices.  Is there a way
: to avoid the hard-coded major numbers in the cdevsw[] entry that's
: passed?  It seems like make_dev() should be able to roam cdevsw, find
: an empty slot, and create the dev nodes for me.  I'm envisioning a very
: dynamic system with lots of modules (enough that we really don't want to
: allocate them with a human involved) being popped in and out and would
: like to not handle the major number management and inevitable conflicts
: on my own.

No.  Get a major number from us and avoid confusion.

Or wait for 5.0 and devfs.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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