[U-Boot] [PATCH 00/14] usb: xhci: Add interrupt transfer support and full speed device support

Bin Meng bmeng.cn at gmail.com
Tue Sep 19 01:38:30 UTC 2017


Hi Stefan,

On Mon, Sep 18, 2017 at 11:38 PM, Stefan Roese <sr at denx.de> wrote:
> Hi Bin,
>
> On 18.09.2017 17:26, Stefan Roese wrote:
>> On 18.09.2017 17:13, Marek Vasut wrote:
>>> On 09/18/2017 03:40 PM, Bin Meng wrote:
>>>>
>>>> This adds the missing interrupt transfer support to xHCI driver, so
>>>> that devices like USB keyboard that uses interrupt transfer when
>>>> CONFIG_SYS_USB_EVENT_POLL is defined can work.
>>>>
>>>> This also adds full speed device support. Unlike low/high/super speed
>>>> devices, full speed device may report its endpoint 0 max packet size
>>>> as 8/16/32/64. xHCI driver guesses 64 for the first attempt to get the
>>>> initial 8 bytes device descriptor, and later adjusts the context for
>>>> endpoint 0.
>>>>
>>>> This series also made several updates to xHCI driver to conform with
>>>> the spec.
>>>>
>>>> This series is available at u-boot-x86/xhci-working for testing.
>>> Looks good to me. Stefan, can you please give A-B/R-B on the series ?
>>> I'd like to pick it for 2017.09 :)
>>
>> That would be 2017.11, right?
>>
>> Sure, I'll review and test this series most likely tomorrow.
>
> I did a quick test and most really looks very good. Thanks for all
> this great work on this xHCI stuff.
>
> BUT, issuing a few commands, I was able to hang my board. This
> sequence is reproducible on my board:
>
>
> U-Boot 2017.09-00246-g28758a2992 (Sep 18 2017 - 17:29:52 +0200)
>
> CPU: x86_64, vendor Intel, device 30679h
> DRAM:  4 GiB
> MMC:   pci_mmc: 0, pci_mmc: 1, pci_mmc: 2
> SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
> Model: theadorable-x86-DFI-BT700
> Net:   No ethernet found.
> scanning bus for devices...
> Target spinup took 0 ms.
> SATA link 1 timeout.
> AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
> flags: 64bit ncq stag pm led clo pio slum part sxs
>   Device 0: (0:0) Vendor: ATA Prod.: SanDisk Ultra II Rev: X411
>             Type: Hard Disk
>             Capacity: 457862.8 MB = 447.1 GB (937703088 x 512)
> 960138 bytes read in 72 ms (12.7 MiB/s)
> Video: 800x600x16
> Hit any key to stop autoboot:  0
> =>
> =>
> => usb reset
> resetting USB...
> USB0:   Register 7000820 NbrPorts 7
> Starting the controller
> USB XHCI 1.00
> scanning bus 0 for devices... cannot reset port 1!?
> 7 USB Device(s) found
>        scanning usb for storage devices... 2 Storage Device(s) found
> => usb tree
> USB device tree:
>   1  Hub (5 Gb/s, 0mA)
>   |  U-Boot XHCI Host Controller
>   |
>   +-2  Hub (480 Mb/s, 100mA)
>   | |
>   | +-5  Hub (12 Mb/s, 100mA)
>   |
>   +-3  Hub (480 Mb/s, 2mA)
>   | |
>   | +-6  Mass Storage (480 Mb/s, 98mA)
>   | |    USBest Technology USB Mass Storage Device 09092207fbf0c4
>   | |
>   | +-7  Mass Storage (480 Mb/s, 500mA)
>   |      General  USB Flash Disk   000000000000034B
>   |
>   +-4  Vendor specific (5 Gb/s, 64mA)
>        Realtek USB 10/100/1000 LAN 000002000000
>
> => ls usb 1
>             System Volume Information/
>  16779264   PRIME-B350-PLUS-ASUS-0613.CAP
>  16779264   PRIME-B350-PLUS-ASUS-0805.CAP
>
> 3 file(s), 1 dir(s)
>
> => usb tree
> USB device tree:
>   1  Hub (5 Gb/s, 0mA)
>   |  U-Boot XHCI Host Controller
>   |
>   +-2  Hub (480 Mb/s, 100mA)
>   | |
>   | +-5  Hub (12 Mb/s, 100mA)
>   |
>   +-3  Hub (480 Mb/s, 2mA)
>   | |
>   | +-6  Mass Storage (480 Mb/s, 98mA)
>   | |    USBest Technology USB Mass Storage Device 09092207fbf0c4
>   | |
>   | +-7  Mass Storage (480 Mb/s, 500mA)
>   |   |  General  USB Flash Disk   000000000000034B
>   |   |
>   |   |General Protection
> EIP: 0010:[<7b56f724>] EFLAGS: 00010246
> Original EIP :[<fff1e724>]
> EAX: 7b33ac18 EBX: 00000000 ECX: ffffffbf EDX: 7b33ac18
> ESI: 7b33ad30 EDI: 00000006 EBP: 7b37b188 ESP: 7b33ac08
>  DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
> CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
> DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
> DR6: ffff0ff0 DR7: 00000400
> Stack:
>     0x7b33ac48 : 0x7b37b160
>     0x7b33ac44 : 0x00000000
>     0x7b33ac40 : 0x00000000
>     0x7b33ac3c : 0x00000000
>     0x7b33ac38 : 0x00000000
>     0x7b33ac34 : 0x20202020
>     0x7b33ac30 : 0x52474d54
>     0x7b33ac2c : 0x7b37baa8
>     0x7b33ac28 : 0x7b37baa8
>     0x7b33ac24 : 0x7b33ad30
>     0x7b33ac20 : 0x7b5aa84e
>     0x7b33ac1c : 0x7b55f008
>     0x7b33ac18 : 0xffffffbf
>     0x7b33ac14 : 0xcc0a06e4
>     0x7b33ac10 : 0xc0e88a40
>     0x7b33ac0c : 0x568ad686
> --->0x7b33ac08 : 0x7b56f776
>     0x7b33ac04 : 0x00010246
>     0x7b33ac00 : 0x00000010
>     0x7b33abfc : 0x7b56f724
> ### ERROR ### Please RESET the board ###
>
>
> Are you able to reproduce this on your board(s) as well? Any ideas
> on this? Please let me know if I can do any further tests.

This is an known issue of 'usb info' and 'usb tree' command. See
previous patch on ML @ http://patchwork.ozlabs.org/patch/810732/.
However, that patch has serious issues and needs rework. I can rework
that patch and include it as part of v2 if you like.

Regards,
Bin


More information about the U-Boot mailing list