USB data transfer problem

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Posts: 1
Joined: Wed May 13, 2020 5:51 pm

USB data transfer problem

Thu May 14, 2020 10:31 am

Hi all,
I am having a reliability issue reading data from a USB drive to an sdcard on an AT91SAM9G20EK derived board when updating from an older 3.12.21 kernel to a newer 4.19.78, and I was wondering if anyone had any ideas what could be causing it.

The problem seems to manifest intermittently when transferring data over 64MB in size from a USB pen drive to a 32GB sdcard, but only for some pen drives. Using the updated kernel I've tested 7 different USB pen drives, and 2 of them transfer the data without problems, 1 transfers data but throws up errors, and 4 start to transfer but then error out with the USB pen drive resetting. Using exactly the same hardware but the 3.12 kernel all the pen drives can transfer the data reliably.

I've done a USB protocol capture using the TotalPhase Beagle 12, and when the pen drives error out I can see corrupted packets on the wire as follows:
0 351599 1:11.070.153 1.583 us 2 B P40 CORRUPTED packet E9 0F

Given the only difference is the updated kernel, is there a kernel setting I am missing that could be causing this problem? e.g. buffer sizes, timings, etc.
Location: USA
Posts: 2154
Joined: Thu Apr 19, 2007 10:15 pm

Re: USB data transfer problem

Fri May 15, 2020 9:31 pm

jonpm wrote: Given the only difference is the updated kernel...
The only difference?
Are you reusing the same 3.12 Device Tree blob, or did you update the Device Tree?
Aren't there different results for the various USB (flash) drives?

Your descriptions are vague.
Are you copying a file or performing a block transfer (e.g. `dd`)?
What does "throws up errors" mean?
What does "start ... then error out" mean?
What is a "USB pen drive resetting"?

There never was a Linux4SAM version of Linux version 3.12, so is that version from mainline?
Have you thoroughly reviewed that kernel source for all patches applied for your board, and updated them for the new kernel?
Have you thoroughly reviewed that DT for all patches applied for your board, and updated them for the new DT?


Return to “LINUX”

Who is online

Users browsing this forum: Google [Bot] and 5 guests