[U-Boot] Issue with USB mass storage (thumb drives)

Marek Vasut marex at denx.de
Wed Feb 3 10:40:00 CET 2016


On Wednesday, February 03, 2016 at 08:40:00 AM, Schrempf Frieder wrote:
> On 02.02.2016 17:39, Marek Vasut wrote:
> > On Tuesday, February 02, 2016 at 05:28:42 PM, Fabio Estevam wrote:
> >> Adding Marek in case he has any ideas.
> >> 
> >> On Tue, Feb 2, 2016 at 8:35 AM, Schrempf Frieder
> >> 
> >> <frieder.schrempf at exceet.de> wrote:
> >>> Hello,
> >>> 
> >>> I'm using U-Boot on a custom i.MX6 board and I'm having problems while
> >>> reading (large) files from USB thumb drives.
> >>> I wouldn't really mind if this only happened with some specific USB
> >>> device, but the problem occurs with 3 out of 4 tested thumb drives
> >>> while loading a 100M test file.
> >>> The devices that work seem to be rather old ones.
> >>> 
> >>> The same issue is also reported here:
> >>> https://community.freescale.com/thread/377911
> >>> 
> >>> I can reproduce this behaviour with u-boot-imx v2014.04 and with
> >>> mainline u-boot v2015.10 and v2016.01.
> >>> 
> >>> Can someone tell me if this is a known issue?
> >>> What could be the reason for this and how can I get this working?
> >>> 
> >>> Thanks!
> >>> 
> >>> 
> >>> U-Boot 2016.01 (Feb 02 2016 - 10:31:32 +0100)
> >>> 
> >>> CPU:   Freescale i.MX6SOLO rev1.3 at 792MHz
> >>> CPU:   Industrial temperature grade (-40C to 105C) at 31C
> >>> Reset cause: POR
> >>> Board: MX6EXCEET
> >>> DRAM:  1 GiB
> >>> NAND:  256 MiB
> >>> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> >>> SF: Detected EN25Q80 with page size 256 Bytes, erase size 4 KiB, total
> >>> 1 MiB No panel detected: default to Hannstar-XGA
> >>> Display: Hannstar-XGA (1024x768)
> >>> In:    serial
> >>> Out:   serial
> >>> Err:   serial
> >>> Net:   Found Micrel KS8051/KS8081 PHY
> >>> FEC
> >>> Hit any key to stop autoboot:  0
> >>> => usb start
> >>> starting USB...
> >>> USB0:   Port not available.
> >>> USB1:   USB EHCI 1.00
> >>> scanning bus 1 for devices... 2 USB Device(s) found
> >>> 
> >>>          scanning usb for storage devices... 1 Storage Device(s) found
> >>>          scanning usb for ethernet devices... 0 Ethernet Device(s)
> >>>          found
> >>> 
> >>> => fatload usb 0 0x18000000 test.file
> >>> reading test.file
> >>> EHCI timed out on TD - token=0xac008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x128d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x801f8c80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x801f8c80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x801f8c80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x801f8c80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> EHCI timed out on TD - token=0x80008d80
> >>> Error reading cluster
> >>> ** Unable to read file test.file **
> > 
> > What happens if you do 'dcache off' and then read the file ?
> 
> Unfortunately turning off dcache doesn't seem to change the behaviour.
> I'm still getting the same error messages.

In that case, debug time.

Usual problems are bad routing of the tracks on the board , so try with USB 1.1
hub and if that works, that's your problem.

You can also try "setenv usb_pgood_delay 10000" , this will increase the time
the code takes after reseting root port.

Also try adding #define DEBUG to drivers/usb/host/ehci-hcd.c common/usb.c and 
common/usb_hub.c . You might notice something odd there.

The above output shows that your qTD tokens are not processed , see the active
bit being set. Details in [1] page 54 (Table 3-16).

[1] http://www.intel.com/content/dam/www/public/us/en/documents/technical-
specifications/ehci-specification-for-usb.pdf


More information about the U-Boot mailing list