I'm modifying a linux PCIe driver to work with altera FPGA PCIe core. Inside my driver code, I'do pci_set_master(dev) to make the PCIe read write working.
I'm using altera SG-DMA to do PCIe transfer instead of using ARM DMA. I need to write enable bit to the FPGA DMA to initiate the transfer. It is working perfectly by doing pcie write(barx,offset,data) to the enable bit register.
The problem is, I need my system to initiate the PCIe FPGA DMA when an I/O interrupt happen, but when interrupt happen, inside the ISR i put the pcie write(barx,offset,data) and this cause the whole linux hang there.
Anyone have face this before? Please help me. Thanks in advance.