accesio / APCI

Currently supported and recommended PCI drivers
6 stars 8 forks source link

PCIe_DIO_24S BAR2 region not initialized #14

Closed Wadosh42 closed 11 months ago

Wadosh42 commented 11 months ago

Hi,

After several hours to identify why our new PCIe_DIO_24S wasn't working, we discovered than the kernel module doesn't initialize the ddata->regions[2] for this specific card... We got the card working by simply adding it to this switch case:

https://github.com/accesio/APCI/blob/196b6a34e2500ee6d181ac227b642ed405a0ab03/apci_dev.c#L822

We don't know if it's enough or good but it simply look like someone forget to add this version of the card in this switch statement.

jdolanIV commented 11 months ago

Adding new cards being too complicated and error prone is a big reason why a replacement for APCI is on our roadmap. That is further away than would be any help today though. Looking at the current master I see PCIe_DIO_24S in there for the alloc() and the interrupt() though. It also looks like the irq test program makes use of it. Can you verify the PID that you are seeing with this card? lspci -d 494f: -n

Wadosh42 commented 11 months ago

For the PID, we have two cards (both 24S, one of them is low voltage):

09:04.0 ff00: 494f:0e53 0c:04.0 ff00: 494f:0e53

At first, we have tried to validate the driver installation with the IRQ test but it failed for the reasons explained here.

jdolanIV commented 11 months ago

That is what I see in the code as well. I'm guessing you are using the latest master for your work? Could you provide details for what is not working without your change? I will see if I have hardware on hand this evening.

jdolanIV commented 11 months ago

@Wadosh42 Now that I'm at my desk it's so obvious. APCI has been around forever and I thought the PCIe_DIO_24S would have been in there pretty almost as long. I added it to the switch statement and pushed it out on master. -- Jay

Wadosh42 commented 11 months ago

@jdolanIV Thanks for the rapid fix! We will notify you if we found anything else during our development with this board 😄