[U-Boot] Raspberry Pi USB storage broken after 64 byte device descriptor patch

Kristian Amlie kristian.amlie at northern.tech
Tue Jan 30 07:18:46 UTC 2018


I have a recent problem with USB storage on the Raspberry Pi 3 with
U-Boot. Take a look at the output from v2017.01:

------
USB0:   Core Release: 2.80a
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Hit any key to stop autoboot:  0
U-Boot>
------

which is the correct output. And compare to v2018.01:

------
USB0:   Core Release: 2.80a
scanning bus 0 for devices... unable to get device descriptor(error=-110)
3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
U-Boot>
------

I'm unable to use USB storage afterwards, such as "ls usb 0".

I have bisected the commits and found that the problem was introduced in
the commit below. I am not familiar enough with USB internals to comment
on the correctness of the commit, but apparently it's not working
entirely as expected. Maybe the original author can comment?

------
commit c008faa77358bb5b313696dd1d5bb8afa03a6ca2
Author: Bin Meng <bmeng.cn at gmail.com>
Date:   Mon Sep 18 15:40:42 2017

    usb: Only get 64 bytes device descriptor for full speed devices

    Full speed device endpoint 0 can have 8/16/32/64 bMaxPacketSize0.
    Other speed devices report fixed value per USB spec. So it only
    makes sense if we send a get device descriptor with 64 bytes to
    full speed devices.

    While we are here, update the comment block to be within 80 cols.

    Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
------

-- 
Kristian


More information about the U-Boot mailing list