From owner-freebsd-hackers Thu Mar 14 7:44:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 22FAA37B402 for ; Thu, 14 Mar 2002 07:44:04 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g2EFi2i36701; Thu, 14 Mar 2002 08:44:03 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g2EFi2L49758; Thu, 14 Mar 2002 08:44:02 -0700 (MST) (envelope-from imp@village.org) Date: Thu, 14 Mar 2002 08:43:39 -0700 (MST) Message-Id: <20020314.084339.123422762.imp@village.org> To: doconnor@gsoft.com.au Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PCI read config functions From: "M. Warner Losh" In-Reply-To: <1016089135.522.50.camel@chowder.gsoft.com.au> References: <1016009035.1876.72.camel@chowder.gsoft.com.au> <20020313.234139.40854153.imp@village.org> <1016089135.522.50.camel@chowder.gsoft.com.au> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 In message: <1016089135.522.50.camel@chowder.gsoft.com.au> "Daniel O'Connor" writes: : On Thu, 2002-03-14 at 18:11, M. Warner Losh wrote: : > : However this just ends up printing 0. : > : : > : (PCI_DC_SIO_PORT is 0x2f) : > : > Do you have the right dev? : > : > bcr = pci_read_config(sp->sc->dev, CB_PCI_BRIDGE_CTRL, 2); : > : > is what I use in the pccard bridge pci driver and it works. : : I believe so.. : The code I pasted is in the probe routine of the device just after a : check that the vendor and device ID are correct. : : Perhaps not all of it is mapped? (or isn't during probe?) : Or some other straw grabbing statement :) The pci config space is always mapped. What does pciconf -r pciX:Y:Z 0:0xff say? X:Y:Z is the pci bus address. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message