Usb loopback through device fails with timeout

Hi,
Please apply attached patch to kernel and try again.
r28_TEST_0001-usb-gadget-xudc-fix-ep-transfer-ring-overwrite.zip (535 Bytes)

hi DaneLLL,
It’s working fine with the above patch. Thanks

Hey guys!
So I created the gadget as @dawnpaul had mentioned and set the bulk_buflen to 1382400. When I ran the test file (testnew.cpp), I got the following (endless) :
Writing Data…actualread=%d1382400
READ_SUCCESS
Writing Data…actualwrite=%d1382400
WRITE_SUCCESS
Writing Data…actualread=%d1382400
READ_SUCCESS
Writing Data…actualwrite=%d1382400
WRITE_SUCCESS
Writing Data…actualread=%d1382400
READ_SUCCESS
Writing Data…actualwrite=%d1382400
WRITE_SUCCESS
Writing Data…actualread=%d1382400

I am not sure if this is correct. I also wanted to ask where the data is being written to as the dmesg on the Jetson Nano is not really showing any messages regarding the transfer. Thanks in advance for the help