[U-Boot] USB3.0 support snacs 0 storage device

Satendra... satendra.pratap at gmail.com
Thu Jan 17 07:03:40 CET 2013


Hi ,

I had ported usb3.0 xHCI driver code (not merged yet in the U-Boot :
http://patchwork.ozlabs.org/patch/193477/
) from U-Boot to Barebox. Using that I was able to detect the Controller
and hub but not the usb storage devices.

So I thought porting usb3.0 xHCI driver code as is (not integrating in
barebox usb driver framework) from U-Boot to
barebox and also ported the Barebox's usb core and command code just to
test whether original code works fine.
But still code not able to detect any storage device device but controller
and hub.

I get as shown below:

"usb_storage_probe:1237:Probing Storage Devices......
0 Storage Device(s) found"

Below is the complete log :
--------------------------------------------------
Barebox-C2K >/
Barebox-C2K >/ usb start
do_usb:405: ..........

        argv[0]=usb
        argv[1]=start
(Re)start USB...
USB0:   usb_lowlevel_init:3343........
### comcerto_start_xhci
### comcerto_usb3_phy_init
USB3.0 clock selected: internal
init hccr 9f000000 and hcor 9f000020 hc_length 32
Halt the HC
// Reset the HC
Register 2000110 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0x40
USB_DT_DEVICE request
scrlen = 18
 req->length = 64
, length = 64
set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length
0x0
scrlen = 0
 req->length = 0
, length = 0
Len is 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0x12
USB_DT_DEVICE request
scrlen = 18
 req->length = 18
, length = 18
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0x9
USB_DT_CONFIG config
scrlen = 25
 req->length = 9
, length = 9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0x19
USB_DT_CONFIG config
scrlen = 25
 req->length = 25
, length = 25
get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 8
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length
0x0
new device strings: Mfr=1, Product=2, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0
length 0xFF
USB_DT_STRING config
scrlen = 4
 req->length = 255
, length = 255
USB device number 1 default language ID 0x1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1
length 0xFF
USB_DT_STRING config
scrlen = 14
 req->length = 255
, length = 255
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1
length 0xFF
USB_DT_STRING config
scrlen = 42
 req->length = 255
, length = 255
Manufacturer u-boot
Product      XHCI Host Controller
SerialNumber


USB hub found


usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length 0x4
USB_DT_HUB config
scrlen = 8
 req->length = 4
, length = 4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length 0xC
USB_DT_HUB config
scrlen = 8
 req->length = 12
, length = 12
2 ports detected
unknown reserved power switching mode
standalone hub
individual port over-current protection
power on to power good time: 20ms
hub controller current requirement: 0mA
port 1 is removable
port 2 is removable
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0
length 0x4
scrlen = 2
 req->length = 4
, length = 4
get_hub_status returned status 1, change 8A02
local power source is lost (inactive)
no over-current condition exists
enabling power on all ports
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1
length 0x0
scrlen = 0
 req->length = 0
, length = 0
Len is 0
port 1 returns 0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2
length 0x0
scrlen = 0
 req->length = 0
, length = 0
Len is 0
port 2 returns 0
Waiting 16991886 msec to enable power on all ports.
enabling power on all ports done.
usb_hub_configure:usb_hub_power_on() done
usb_hub_configure:430 get_timer()
get_timer:68: cur = 15899899126
get_timer:72: cur=15899899126 cur>>19=30326
usb_hub_configure:433 get_timer() done.
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1
length 0x4
scrlen = 4
 req->length = 4
, length = 4
usb_hub_configure:456:portchange = 0x0
Port 1 Status 0 Change 0
usb_hub_configure:430 get_timer()
get_timer:68: cur = 15946928539
get_timer:72: cur=15946928539 cur>>19=30416
usb_hub_configure:433 get_timer() done.
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2
length 0x4
scrlen = 4
 req->length = 4
, length = 4
usb_hub_configure:456:portchange = 0x0
Port 2 Status 200 Change 0
usb_hub_configure: done
usb_new_device done.

1 USB Device(s) found

scan end

do_usb:started USB with ret = 0...
       scanning usb for storage devices...
usb_stor_scan:256: Create usb_dev_desc[0]
usb_stor_scan:256: Create usb_dev_desc[1]
usb_stor_scan:256: Create usb_dev_desc[2]
usb_stor_scan:256: Create usb_dev_desc[3]
usb_stor_scan:256: Create usb_dev_desc[4]
i=0 dev=0x104b940
i=0, dev_num=1
usb_storage_probe:1237:Probing Storage Devices......
iVendor 0 iProduct 0
usb_storage_probe:1261:Not a USB Mass Storage device.
        dev->descriptor.bDeviceClass=0x9
        iface->desc.bInterfaceClass=0x9
        iface->desc.bInterfaceSubClass=0x0
        iface->desc.bInterfaceSubClass=0x0
i=1 dev=0x0

0 Storage Device(s) found

do_usb:(Re)started USB with ret = 0...
Barebox-C2K >/
Barebox-C2K >/
Barebox-C2K >/ usb tree
do_usb:405: ..........

        argv[0]=usb
        argv[1]=tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
     u-boot XHCI Host Controller

Barebox-C2K >/
Barebox-C2K >/
Barebox-C2K >/ usb info
do_usb:405: ..........

        argv[0]=usb
        argv[1]=info
1: Hub,  USB Revision 3.0
 - u-boot XHCI Host Controller
 - Class: Hub
 - PacketSize: 9  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

Barebox-C2K >/
Barebox-C2K >/
---------------------------------------------------------

Any help is appreciated.

Thanks,
Satendra


More information about the U-Boot mailing list