From owner-freebsd-hackers Mon Nov 13 8:51:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 56FBD37B4C5 for ; Mon, 13 Nov 2000 08:51:16 -0800 (PST) Received: from billy-club.village.org (billy-club.village.org [10.0.0.3]) by rover.village.org (8.11.0/8.11.0) with ESMTP id eADGpDR07132; Mon, 13 Nov 2000 09:51:13 -0700 (MST) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (localhost [127.0.0.1]) by billy-club.village.org (8.11.1/8.8.3) with ESMTP id eADGqkG40565; Mon, 13 Nov 2000 09:52:47 -0700 (MST) Message-Id: <200011131652.eADGqkG40565@billy-club.village.org> To: Robert Lipe Subject: Re: pci bus enumeration & cdevsw indexing Cc: freebsd-hackers@FreeBSD.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> Date: Mon, 13 Nov 2000 09:52:46 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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