adilkaraoz wrote:
>   pci1711_card->location = pci_resource_start(dev, PCI_1711_BAR & 0xFFFFFFF0
> );
>   pci1711_card->mem_size = pci_resource_len(dev, PCI_1711_BAR & 0xFFFFFFF0
> );

I really have doubts about this: the arguments passed to these functions
should be a something ranging from 0 to 5 inclusive. Now, PCI_1711_BAR &
0xFFFFFFF0 seems odd.
If PCI_1711_BAR is less than 0x10, the result of this mask will always be 0.
If PCI_1711_BAR is greater than 0xf, you end up accessing random memory.

Also note that since 2.6.28, there is a pci_ioremap_bar function, which
does all the pci_resouce and ioremap job.

> 
>   //if(pci1711_card->location == 0){
>     printk( KERN_WARNING "xeno_pc1711_driver: location = %lx mem = %lx\n",
> pci1711_card->location, pci1711_card->mem_size);
>   //}
> 
>     ret_val = pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
>     if (!ret_val){
> rtdm_printk("interrupt line no:%d",irq);
>  }

That is not the way to get the interrupt line either, you should use
dev->irq.

-- 
                                                                Gilles.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to