Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2001 10:14:53 -0400 (EDT)
From:      Kenneth Wayne Culver <culverk@wam.umd.edu>
To:        Murray Stokely <murray@osd.bsdi.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: pci device driver writing newbie
Message-ID:  <Pine.GSO.4.21.0107191008300.941-100000@rac5.wam.umd.edu>
In-Reply-To: <20010718235928.A18388@meow.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0107191008300.941-100000>