Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 2002 23:41: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:  <20020313.234139.40854153.imp@village.org>
In-Reply-To: <1016009035.1876.72.camel@chowder.gsoft.com.au>
References:  <1016009035.1876.72.camel@chowder.gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1016009035.1876.72.camel@chowder.gsoft.com.au>
            "Daniel O'Connor" <doconnor@gsoft.com.au> writes:
: In the Linux driver there is stuff like ->
:                 if ((rc = pcibios_read_config_byte(bus, dev_fn, PCI_DC_SIO_PORT,
:                                       &nport)) != PCIBIOS_SUCCESSFUL) break;
: 
: And I think the equiv would be ->
:     tmp = pci_read_config(dev, PCI_DC_SIO_PORT, /*bytes*/1);
:     printf("pccom: number of ports - %d\n", tmp);
: 
: 
: 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.

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?20020313.234139.40854153.imp>