I am trying to write a linux driver for a PCIe device - the Adlink PCIe 7300A High-Speed digital-IO card.

The driver works fine for normal memory transfer, but attempting to use the card's bus-mastering capabilities to initiate DMA transfer of a buffer from CPU memory to the device's output FIFO buffer simply does not work.

I have been trying to solve this problem on the order of weeks, not on the order of days.

Any insight at all would really really be appreciated.

Driver code -- https://github.com/sbrookes/timing_driver_sdarn/blob/master/kernel_land/timing.c

Device Datasheet -- http://www.acceed.com/manuals/adlink/P7300A%20Manual.PDF

PLX 9080 PCI Interface chip Datasheet -- http://www.der-ingo.de/bin/milanhelp/PLX9080.pdf

I can not explain how much I would appreciate any bit of insight.

Thank you,

Scott

有帮助吗?

解决方案

I seem to have solved the problem. It seems like there was an incorrect condition in the interrupt handler that was aborting the DMA transfer at the wrong time, never letting the transfer even begin.

A serious "duh" moment, but it took serious struggle to find it.

As per the comments, sorry if I polluted SO with my desperation. Still learning how to be a good citizen.

Not sure if the code linked above will remain static as my project changes or whether that link will reflect the most current version. Basically just be careful not to abort your transfer at the wrong time.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top