Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - pci_device_find QNX 7.0: (4 Items)
   
pci_device_find QNX 7.0  
We have a hardware configuration with 2 identical PCIexpress boards.

When the first board isn't handled by a resource manager und pci_device_find is searching the second board it doesn't 
find it.

If the first board is activily handled by a resource manger, pci_device_find finds the second board.

I think this is not a correct behavior.

Regards

Armin
Re: pci_device_find QNX 7.0  
Regardless whether or not a device is being handled by a resource manager/driver, pci_device_find() will locate all 
enumerated devices.
When the system first starts, before you start any resource manager on you device, do both instances of the device show 
up in the pci-tool output?
If they do, then pci_device_find() will also find them given the correct parameters because pci-tool uses the 
pci_device_find() API.
If you have 2 instances of a device, the instance of interest is specified with the first parameter to pci_device_find()
. Keep in mind however that this is based on the search criteria. It may be that the wrong 'idx' parameter is being 
passed to pci_device_find().
Please see also the 'use' information in pci-tool that describes this. If none of this solves the problem, please 
provide additional information (slog2info, pci_tool -tvv output, etc)
Re: pci_device_find QNX 7.0  
> Regardless whether or not a device is being handled by a resource manager/
> driver, pci_device_find() will locate all enumerated devices.

Yes, that's the way it should be ...

> When the system first starts, before you start any resource manager on you 
> device, do both instances of the device show up in the pci-tool output?

Yes

> If they do, then pci_device_find() will also find them given the correct 
> parameters because pci-tool uses the pci_device_find() API.
> If you have 2 instances of a device, the instance of interest is specified 
> with the first parameter to pci_device_find(). Keep in mind however that this ases ..
> is based on the search criteria. It may be that the wrong 'idx' parameter is 
> being passed to pci_device_find().

No  .. that's not the case. Our customer did report: 
--------------------------------------------
Wow, never mind! I got the board not found error only if I tried loading driver for board 2 alone.
As soon as I loaded both board 1 and 2, it is working.

	display_msg "Starting CAN Bus on PEAK Systems"
	can_dual -n can1 -e wm0 -k 8175DE1D6D8921A3DB2ED128 -d 1 &
	can_dual -n can2 -e wm0 -k 8175DE1D6D8921A3DB2ED128 -d 2 &

So I have tested each channel one-by-one, and all seems good with driver reading now.
------------------------------------------------------------------

The start of the resource managers are included into the boot image.

> Please see also the 'use' information in pci-tool that 
describes this. If nonemanager 
>  of this solves the problem, please provide additional information (slog2info,
>  pci_tool -tvv output, etc)

I wll ask our customer to send us the syslog entries for the case when only the resource manager of the second board has
 been started -> that's the "device not found" case.

Regards

Armin
Re: pci_device_find QNX 7.0  
Michael Kisel schrieb:
> Regardless whether or not a device is being handled by a resource manager/driver, pci_device_find() will locate all 
enumerated devices.

Yes, it *should* locate all enumerated devices. But it doesn't in our 
case ! That's simply a matter
of facts.
> see
> When the system first starts, before you start any resource manager on you device, do both instances of the device 
show up in the pci-tool output?
Again ...  the identical resource managers of two identical boards are 
started out of a very late position within a boot image.
> If they do, then pci_device_find() will also find them given the correct parameters bec pci-tool uses the 
pci_device_find() API.
> If you have 2 instances of a device, the instance of interest is specified with the first parameter to 
pci_device_find(). Keep in mind however that this is based on the search criteria. It may be that the wrong 'idx' 
parameter is being passed to pci_device_find().
*We do it since more than 25 years in a correct way and understanding!**
*
> Please see also the 'use' information in pci-tool that describes this. If none of this solves the problem, please 
provide additional information (slog2info, pci_tool -tvv output, etc)
The behavior of pci_device_find seems to work unpredictable in our 
configuration.
  Are there any timing problem within the pci_server?

Armin


Attachment: HTML sf-attachment-mime35805 2.28 KB