From owner-freebsd-hackers Wed Mar 13 22:59: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id EAD0937B419 for ; Wed, 13 Mar 2002 22:58:57 -0800 (PST) Received: from localhost (root@localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.2/8.12.2) with ESMTP id g2E6wsF7024835; Thu, 14 Mar 2002 17:28:55 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: PCI read config functions From: "Daniel O'Connor" To: "M. Warner Losh" Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <20020313.234139.40854153.imp@village.org> References: <1016009035.1876.72.camel@chowder.gsoft.com.au> <20020313.234139.40854153.imp@village.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 14 Mar 2002 18:28:54 +1130 Message-Id: <1016089135.522.50.camel@chowder.gsoft.com.au> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 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 :) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message