LS1012A USB 3.0 tranfer problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1012A USB 3.0 tranfer problem

1,526 Views
shirase
Contributor I

Hi all.

For our project we use grapeboard (LS1012A) with Cypress FX3, and we have a problem when transferring data via USB 3.0 bus on high speed rates.
Without any background processes, we achieved stable tranfer at 2.9 Gbit/s, but we need to write this data to SSD.

If, in parallel with reading data from the USB, we somehow use DMA channels - write to SSD, use a copy_to_user function or a dmatest module with blocks greater than 64-128 kbytes, transmission via the USB is interrupted after some time with an error COMP_TX_ERR. With blocks of more than 1 MB, transmission is interrupted immediately. Simple memcpy test does not affect on the transmission.
Similarly, if we use a burstlen less than 16, for example 4 or 2, the transmission stability increases, but still remains unstable and can be interrupted after hours of operation.


What is the reason for this behavior?

How can we increase stability of the transfer?

Can we increase the priority of the DMA channel of the XHCI controller?

Logs with xhci trace is attached in xhci-trace-log.txt. Boot log is in boot-log.txt.

Kernel version 4.9.62.

I will be glad to any advice. Thank you.

Tags (2)
3 Replies

957 Views
zmlopez
Contributor III

Hi.

It seems, by the dts, that LS1012A uses synopsys DWC3 IP core:

usb0: usb3@2f00000 {
compatible = "snps,dwc3";
reg = <0x0 0x2f00000 0x0 0x10000>;
interrupts = <0 60 0x4>;
dr_mode = "host";
snps,quirk-frame-length-adjustment = <0x20>;
snps,dis_rxdet_inp3_quirk;
};

I suggest to try with the last version of dwc3 linux driver to see if it helps.

There are a lot of patches to that driver lately.

957 Views
shirase
Contributor I

Thanks, Miguel, for the answer. There were really a lot of patches to the dwc3, including the kernel api. Attempts to use some of these patches give either crash on booting, or a compilation error. And the only way to run the last version of the dwc3 driver is to port the latest kernel to a LS1012A, which is not possible within a reasonable time.

0 Kudos

957 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Vasia Pupkin,

Please refer to Documentation/usb/dma.txt.

Please add "dma-coherent" property in the USB device node to check whether it would be helpful.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos