From owner-freebsd-hackers Thu Jul 19 7:14:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id 3EA7337B401 for ; Thu, 19 Jul 2001 07:14:56 -0700 (PDT) (envelope-from culverk@wam.umd.edu) Received: from rac5.wam.umd.edu (IDENT:root@rac5.wam.umd.edu [128.8.10.145]) by po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id KAA15026; Thu, 19 Jul 2001 10:14:53 -0400 (EDT) Received: from rac5.wam.umd.edu (IDENT:sendmail@localhost [127.0.0.1]) by rac5.wam.umd.edu (8.9.3/8.9.3) with SMTP id KAA02260; Thu, 19 Jul 2001 10:14:53 -0400 (EDT) Received: from localhost (culverk@localhost) by rac5.wam.umd.edu (8.9.3/8.9.3) with ESMTP id KAA02256; Thu, 19 Jul 2001 10:14:53 -0400 (EDT) X-Authentication-Warning: rac5.wam.umd.edu: culverk owned process doing -bs Date: Thu, 19 Jul 2001 10:14:53 -0400 (EDT) From: Kenneth Wayne Culver To: Murray Stokely Cc: freebsd-hackers@freebsd.org Subject: Re: pci device driver writing newbie In-Reply-To: <20010718235928.A18388@meow.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Wed, Jul 18, 2001 at 09:08:31PM -0400, Kenneth Wayne Culver wrote: > > get my module (which right now does mostly nothing except probing and > > attaching) to detect the ACPI function of this chip, but right now pciconf > > -l shows it as "chip0". I found the devid in > > /usr/src/sys/pci/pcisupport.c, (0x30571106) and commented that case out, > > recompiled my kernel, and rebooted, but no luck, it still detects as > > chip0. What can I do to keep this from happening. This is the only way I > > The first thing that comes to mind is that you will probably find > using a KLD much easier during development for this sort of thing. > There is some basic information in the Developer's Handbook about this > but it is incomplete : > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ > Yep, I already looked at that :-) I'm using a kld for development for the very reason that I don't have to keep rebooting to test. The print of the pci_get_devid in my probe function returns 2 values, and they correspond to the device that say "none0" and "none1" beside them. chip0 reports chip=0x30571106. According to the documentation I have for the via chipset, this is what is supposed be reported for this chip. It's the ACPI device on my via686a chipset. What I did was comment out the case for that devid number from pcisupport.c in /usr/src/sys/pci (I'm working on stable right now) and recompiled my kernel, but that doesn't seem to have made any difference. I'm at work now so I can't try anything else until this evening. One thing I'll try is doing a config -r KERNEL to get rid of all the obj files and recompile everything; I have the feeling that pcisupport.c never compiled over again. Anyway, thanks for your help. > Can you print the return value of pci_get_vendor() in your probe() > function to verify that you are getting the same listing that pciconf > -l reports? Remember that if pciconf -l returns something like > chip=0x2a601093 then 1093 is the vendor ID and 2a60 is the device ID. > I guess the vendor ID for this chip would be 0x1106 then Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message