Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDMA: Driver hangs during streaming test got a block size larger than 1 MB #38

Open
rsarwar87 opened this issue Oct 21, 2019 · 2 comments

Comments

@rsarwar87
Copy link

rsarwar87 commented Oct 21, 2019

driver becomes non responsive. terminating the program and restarting the application does not work as the drivers fail to do anything after wards

I have made a workaround by commenting out the cyclic bugger, but I presume there is a better solution to the problem

index 029d0d3..654b44f 100644
--- a/XDMA/linux-kernel/xdma/cdev_sgdma.c
+++ b/XDMA/linux-kernel/xdma/cdev_sgdma.c
@@ -312,13 +312,13 @@ static ssize_t char_sgdma_read(struct file *file, char __user *buf,
 
        engine = xcdev->engine;
 
-       if (engine->streaming && engine->dir == DMA_FROM_DEVICE) {
-               rv = xdma_cyclic_transfer_setup(engine);
-               if (rv < 0 && rv != -EBUSY)
-                       return rv;
-               /* 600 sec. timeout */
-               return xdma_engine_read_cyclic(engine, buf, count, 600000);
-       }
+       //if (engine->streaming && engine->dir == DMA_FROM_DEVICE) {
+       //      rv = xdma_cyclic_transfer_setup(engine);
+       //      if (rv < 0 && rv != -EBUSY)
+       //              return rv;
+       //       /* 600 sec. timeout */
+       //      return xdma_engine_read_cyclic(engine, buf, count, 600000);
+       //}
 
         return char_sgdma_read_write(file, (char *)buf, count, pos, 0);
 }
@Thesane
Copy link

Thesane commented Dec 12, 2019

I found the issue is related to CYCLIC_RX_PAGES_MAX * PAGE_SIZE (1MB) which causes an overrun (head == tail) and doesn't reset properly. I am trying to figure out a fix for it to make cyclic C2H work. Also I have already tried the same workaround you did, however I noticed a low memory corruption error in the kern.log which happens a few seconds after the transfer is complete

@sujathabanoth-xlnx sujathabanoth-xlnx changed the title Driver hangs during streaming test got a block size larger than 1 MB XDMA: Driver hangs during streaming test got a block size larger than 1 MB Jan 29, 2021
@hmaarrfk
Copy link

Hello,

My name is Mark Harfouche. I am not affiliated with Xilinx in any way. Over the
years of using QDMA, I've been wanted better community organization.

I've created a fork of dma_ip_drivers which I intend to maintain and work with the
community at large to improve.

The fork can be found https://github.com/hmaarrfk/dma_ip_drivers

For now, I am stating the main goals of the repository in
hmaarrfk#2

If you are interested in working together, feel free to open an issue or PR to
my fork.

Best,

Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants