From owner-freebsd-hackers Thu Nov 12 09:03:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA28107 for freebsd-hackers-outgoing; Thu, 12 Nov 1998 09:03:22 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (castles361.castles.com [208.214.167.61]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA28101 for ; Thu, 12 Nov 1998 09:03:19 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id IAA11527; Thu, 12 Nov 1998 08:59:43 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199811121659.IAA11527@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Larry S. Lile" cc: "Ron G. Minnich" , hackers@FreeBSD.ORG Subject: Re: PCI device question In-reply-to: Your message of "Thu, 12 Nov 1998 11:59:37 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Nov 1998 08:59:43 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > I already know the io-base address, dma-level, csn, pci slot, ... from > > > another call. > > > > That's where stuff like base address etc. are. If you have pulled out > > base address info via config read and friends then you already know. If > > you are not pulling base etc. out via config reads then you have to fix > > your driver :-) > > > > Functions look like this: > > int data = pci_conf_read(tag, PCI_CLASS_REG); > > > > Are you using these? > > No, there is a probe function in the driver kit that will find all > of the adapters presumably through PIO, so I have not neede to > delve into this yet. They then want a pointer into the right spot > in memory for the config. info passed into another function. Don't do this. It's Bad and Evil and if they feel the only way to find device information is to go behind the system's back then I can't wait to hear what else they think is a "good idea". > What I need is a way to get a pointer (char *) to the beginning > of the config. info for a particular card (one with a PCI ID of > 108D0001). Config data is not guaranteed to be memory-mapped. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message