Hi Pekka,

In general in QNX4 for identical PCI devices logical number PCI index and _CA_PCI_Find_Device(), _CA_PCI_Find_Class() functions  are used.

You can use _CA_PCI_Find_Device() with index 0 to discover first device and with index 1 to discover second device. The first device would be a device that is placed higher in PCI topology.

In most cases hardware pci slot is linked with PCI device number (device in particular slot has fixed device number). For example PCI-to-PCI Bridge Architecture Specification describe the Device Number to Slot Number assignment rules.

Regards,
Pavel

Hi, we are using route table information for looking the right slot where our card is defined. We have to find the right PCI-card because example we could have I/O on first card and frequency converters on second card. Is there other way to approach slot issue? 

Pekka,

The -E0 option was implemented as a workaround for BIOS issue which
cause crash with SIGSEGV on PCI BIOS functions calls.  You can try
different BIOS versions (if they are available) to see if you can use
Proc32 without -E0 option.
For which purpose you are using route table information?


Regards,
Pavel

Yes im using it with -E0 option. It is critical because now my code doesn´t
 work with this new board. And I have to find another way to find those 
identical  pci-cards. And this takes time and money. But if I dont have a 
choice...  

          
Hi Pekka,

If you use the Proc32 with -E0 option the reason can be in the Proc32
module. With -E0 option Proc32 doesn't use PCI BIOS functions, instead
it uses software implementation of most PCI BIOS functionality.
GET IRQ ROUTING INFORMATION and SET PCI IRQ requests are not implemented
in the current version and corresponding  QNX functions will return an
error.
Is it critical for you to use irq routing?

Regards,
Pavel

No effect on that cmd.BufferSize preset. 

What happens if you preset cmd.BufferSize to 2K?




On 2012-08-31 7:15 AM, "Pekka Tuusjärvi" <community-noreply@qnx.com> wrote:

I have yet another problem with this motherboard. Im trying to use two
PCI-card which is exatcly same kind of cards. This code  returns that
PCI_BUFFER_TOO_SMALL error only with this motherboard. Something to do
with BIOS? Do you guys have any idea or solution how to proceed??

       struct _pci_route_buffer cmd;
	unsigned irq;
	struct _pci_irq_routing	*route, *r;
	int	i;


	memset(&cmd, 0x00, sizeof cmd);
	if(_CA_PCI_Get_Routing_Options(&cmd, 0) != PCI_BUFFER_TOO_SMALL)
	{
		return(FALSE);
	}
	if(!(route = (struct _pci_irq_routing*) _nmalloc(cmd.BufferSize)))
	{
		return(FALSE);
	}





_______________________________________________

General
http://community.qnx.com/sf/go/post95305
To cancel your subscription to this discussion, please e-mail
general-qnx4-unsubscribe@community.qnx.com



_______________________________________________

General
http://community.qnx.com/sf/go/post95326
To cancel your subscription to this discussion, please e-mail general-qnx4
-
unsubscribe@community.qnx.com




_______________________________________________

General
http://community.qnx.com/sf/go/post95331
To cancel your subscription to this discussion, please e-mail general-qnx4-
unsubscribe@community.qnx.com







_______________________________________________

General
http://community.qnx.com/sf/go/post95340
To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com