Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2002 08:43:39 -0700 (MST)
From:      "M. Warner Losh" <imp@village.org>
To:        doconnor@gsoft.com.au
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: PCI read config functions
Message-ID:  <20020314.084339.123422762.imp@village.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1016089135.522.50.camel@chowder.gsoft.com.au>
            "Daniel O'Connor" <doconnor@gsoft.com.au> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020314.084339.123422762.imp>