Finding PCI device QNXRTP

Hi all,

I want to look up a PCI device with QNXRTP (Neutrino) from the thing in the
program.
But, it is indicated with “Can not find device”.
VenderID and DeviceID are correct value.
What is bad?


#include <hw/pci.h>

#define PCI_VENDOR_ID 0x1264
#define PCI_DEVICE_ID 0x9
:
if( pci_find_device( PCI_DEVICE_ID, PCI_VENDOR_ID, pci_index, &busnum,
&devfuncnum ) != PCI_SUCCESS ) {
printf(“Can not find device\n”);
exit( EXIT_FAILURE );
}

Thanks,


Yuji Ohba
E-mail: y.ohba@kbk.co.jp

In article <8s3tbv$oqt$1@nw032.infoweb.ne.jp>, "Yuji says…

Hi all,

I want to look up a PCI device with QNXRTP (Neutrino) from the thing in the
program.
But, it is indicated with “Can not find device”.
VenderID and DeviceID are correct value.
What is bad?

I’m missing the initialisation of pci_index to 0 …

Armin


#include <hw/pci.h

#define PCI_VENDOR_ID 0x1264
#define PCI_DEVICE_ID 0x9
:
if( pci_find_device( PCI_DEVICE_ID, PCI_VENDOR_ID, pci_index, &busnum,
&devfuncnum ) != PCI_SUCCESS ) {
printf(“Can not find device\n”);
exit( EXIT_FAILURE );
}

Thanks,


Yuji Ohba
E-mail: > y.ohba@kbk.co.jp

Two things:

  • You have to use pci_attach and pci_detach functions to be able to use
    any of the other pci_*() functions.
  • pci_index should be 0.

Alex.

-----Original Message-----
From: Yuji Ohba [mailto:y.ohba@kbk.co.jp]
Posted At: Thursday, October 12, 2000 4:41 AM
Posted To: qnx
Conversation: Finding PCI device QNXRTP
Subject: Finding PCI device QNXRTP


Hi all,

I want to look up a PCI device with QNXRTP (Neutrino) from the thing in
the
program.
But, it is indicated with “Can not find device”.
VenderID and DeviceID are correct value.
What is bad?


#include <hw/pci.h>

#define PCI_VENDOR_ID 0x1264
#define PCI_DEVICE_ID 0x9
:
if( pci_find_device( PCI_DEVICE_ID, PCI_VENDOR_ID, pci_index, &busnum,
&devfuncnum ) != PCI_SUCCESS ) {
printf(“Can not find device\n”);
exit( EXIT_FAILURE );
}

Thanks,


Yuji Ohba
E-mail: y.ohba@kbk.co.jp