pci_present ?

Hi,

I am trying to develop a driver for a PCI card and one of the first things I
am trying to do is find my device on the PCI expansion bus. However, when I
call pci_present to determine if I can proceed it returns a -1 error code.
I am running on a standard P3 based PC with the PE distro. Is there a
reason I am unable to use the functions of <hw/pci.h> in this configuration?
I couldn’t find anything in the documentation regarding special
circumstances for the use of this library.

Thanx,
Dave G.

Dave G. <~~~dkg@ormec.com> wrote:

Hi,

I am trying to develop a driver for a PCI card and one of the first things I
am trying to do is find my device on the PCI expansion bus. However, when I
call pci_present to determine if I can proceed it returns a -1 error code.
I am running on a standard P3 based PC with the PE distro. Is there a
reason I am unable to use the functions of <hw/pci.h> in this configuration?
I couldn’t find anything in the documentation regarding special
circumstances for the use of this library.

You must call pci_attach() before any other pci* functions.

This is noted in the docs for pci_present().

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanx for the help.

But, just to pick nits, it is not noted in the documentation for
pci_present. It is noted in pci_attach that pci_attach needs to be called
before any other pci_* functions. It might be helpful for noobies to note
this in the docs for each pci_* function.

Dave G.

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:b1ungc$2p8$1@nntp.qnx.com

Dave G. <~~~> dkg@ormec.com> > wrote:
Hi,

I am trying to develop a driver for a PCI card and one of the first
things I
am trying to do is find my device on the PCI expansion bus. However,
when I
call pci_present to determine if I can proceed it returns a -1 error
code.
I am running on a standard P3 based PC with the PE distro. Is there a
reason I am unable to use the functions of <hw/pci.h> in this
configuration?
I couldn’t find anything in the documentation regarding special
circumstances for the use of this library.

You must call pci_attach() before any other pci* functions.

This is noted in the docs for pci_present().

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

On a related question. I have sample code that now calls pci_attach as the
first thing. It works fine (returns a valid handle) if I run this code
using remote debugging to my QNX 6.2 box with the Win32 IDE. If I try to
run it natively under the IDE in QNX the same call returns a -1. Sorry for
the newbie questions. Thanx for any help.

Dave G.

Dave G. <~~~dkg@ormec.com> wrote:
: Thanx for the help.

: But, just to pick nits, it is not noted in the documentation for
: pci_present. It is noted in pci_attach that pci_attach needs to be called
: before any other pci_* functions. It might be helpful for noobies to note
: this in the docs for each pci_* function.

Already fixed for release 6.2.1.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Hi Steve,

I’m looking forward to the new release… AFAIK, it i snot available yet -
is it? Any estimate of when it will be out and will we be able to download
it?

Dave G.

“Steve Reid” <stever@qnx.com> wrote in message
news:b2ec34$ar6$1@nntp.qnx.com

Dave G. <~~~> dkg@ormec.com> > wrote:
: Thanx for the help.

: But, just to pick nits, it is not noted in the documentation for
: pci_present. It is noted in pci_attach that pci_attach needs to be
called
: before any other pci_* functions. It might be helpful for noobies to
note
: this in the docs for each pci_* function.

Already fixed for release 6.2.1.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Dave G. <~~~dkg@ormec.com> wrote:
: Hi Steve,

: I’m looking forward to the new release… AFAIK, it i snot available yet -
: is it? Any estimate of when it will be out and will we be able to download
: it?

Your best bet is to ask your sales rep.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems