From owner-freebsd-hackers Sun Jan 21 2:19:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.alcove.fr (smtp.alcove.fr [212.155.209.139]) by hub.freebsd.org (Postfix) with ESMTP id 409D937B401; Sun, 21 Jan 2001 02:19:05 -0800 (PST) Received: from nsouch by smtp.alcove.fr with local (Exim 3.12 #1 (Debian)) id 14KHaR-0002f4-00; Sun, 21 Jan 2001 11:19:03 +0100 Date: Sun, 21 Jan 2001 11:19:03 +0100 From: Nicolas Souchu To: John Baldwin Cc: "Donald J . Maddox" , freebsd-hackers@FreeBSD.org Subject: Re: more info about: odd result of pci_read_config Message-ID: <20010121111903.B10148@ontario.alcove-int> References: <20010120192739.A2127@cae88-102-101.sc.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.4i In-Reply-To: ; from jhb@FreeBSD.org on Sat, Jan 20, 2001 at 04:35:11PM -0800 Organization: =?iso-8859-1?Q?Alc=F4ve=2C_http:=2F=2Fwww=2Ealcove=2Efr?= Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jan 20, 2001 at 04:35:11PM -0800, John Baldwin wrote: > Look in /sys/compile/ after compiling a kernel, it should be in pci_if.* > It's a function that ues kobj to lookup the pci_read_config method in the > parent bus. Look in the PCI code to find the real pci_read_config... > > >From sys/dev/pci/pci.c: > > DEVMETHOD(pci_read_config, pci_read_config_method), > > static u_int32_t > pci_read_config_method(device_t dev, device_t child, int reg, int width) > { > struct pci_devinfo *dinfo = device_get_ivars(child); > pcicfgregs *cfg = &dinfo->cfg; > > return PCIB_READ_CONFIG(device_get_parent(dev), > cfg->bus, cfg->slot, cfg->func, > reg, width); > } On -stable, it calls directly pci_cfgread() with the cfg. My viapm driver is a kmodule. Could it be that PCI_READ_CONFIG is not correctly resolved and returns ENXIO which is 0x6? I'll try to wire it in the kernel. Nicholas -- Nicolas.Souchu@alcove.fr Alcôve - Open Source Software Engineer - http://www.alcove.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message