The Xilinx PCI Express DMA Drivers provided here https://www.xilinx.com/support/answers/65444.html work pretty well but there appears to be some missing functionality for nonblocking reads. I'm using Xilinx_Answer_65444_Linux_Files_rel20180420.zip with Linux Centos 7 and have enable_credit_mp=1. I have PCIe streaming setup from the FPGA, this works when there is data, but falls apart when reading and 0 bytes are returned.
In the driver there is no implementation of file_operations .poll which would be used by sys/select or sys/poll. So the file descriptor is always set in currentReadFdSet for the following select() call in software. A timeout was expected here when no data was available as currentReadFdSet only contains one fd for the /dev/xdma0.
Secondly nowhere in the code are the file->f_flags evaluated. There should be checks for O_NONBLOCK in the read functionality and the driver should return -EAGAIN when there is no data on a nonblocking read.
Is the driver setup for nonblocking operations? because it appears not to be the case.