All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] usb: Fail to get descriptor for USB 2.0 device
@ 2018-05-23 17:00 DATACOM - Paulo.Zaneti
  2018-05-23 17:03 ` Marek Vasut
  0 siblings, 1 reply; 12+ messages in thread
From: DATACOM - Paulo.Zaneti @ 2018-05-23 17:00 UTC (permalink / raw)
  To: u-boot

Hi,

When trying to migrate a board from u-boot version 2016.09 to version 
2018.03, I found a problem with a USB 2.0 device which used to work on 
version 2016.09.

In u-boot version 2016.09 the device appears like this:

2: Mass Storage,  USB Revision 2.0
  - SanDisk Cruzer Blade 200443243002FB509E64
  - Class: (from Interface) Mass Storage
  - PacketSize: 64  Configurations: 1
  - Vendor: 0x0781  Product 0x5567 Version 1.38
    Configuration: 1
    - Interfaces: 1 Bus Powered 200mA
      Interface: 0
      - Alternate Setting 0, Endpoints: 2
      - Class Mass Storage, Transp. SCSI, Bulk only
      - Endpoint 1 In Bulk MaxPacket 512
      - Endpoint 2 Out Bulk MaxPacket 512


But in version 2018.03 I just can't start usb. It fails with following 
error:

=> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
unable to get device descriptor (error=-1)
1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
        scanning usb for storage devices... 0 Storage Device(s) found


I did a "git bisect" and found that this problem is related to the 
following commit:

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

I am not an expert on USB, so I would like to ask for help on this issue.

In u-boot v2018.03, file common/usb.c, line 973, shouldn't the 
comparison be like this:

         if (do_read && dev->speed >= USB_SPEED_FULL) {

or, at list:

         if (do_read && (dev->speed == USB_SPEED_FULL || dev->speed == 
USB_SPEED_HIGH)) {


I would submit a patch for this, but I lack on USB knowledge for 
explaining the patch.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-05-24 22:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 17:00 [U-Boot] usb: Fail to get descriptor for USB 2.0 device DATACOM - Paulo.Zaneti
2018-05-23 17:03 ` Marek Vasut
2018-05-23 17:37   ` DATACOM - Paulo.Zaneti
2018-05-23 17:43     ` Marek Vasut
2018-05-23 17:52       ` DATACOM - Paulo.Zaneti
2018-05-23 18:00         ` Marek Vasut
2018-05-23 20:51           ` DATACOM - Paulo.Zaneti
2018-05-23 21:50             ` Marek Vasut
2018-05-23 23:40             ` Bin Meng
2018-05-24 16:23               ` DATACOM - Paulo.Zaneti
2018-05-24 17:57                 ` Marek Vasut
2018-05-24 22:13                   ` DATACOM - Paulo.Zaneti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.