[#4795] In u-boot trunk, USB dev number mismatch for "usb info" and "usb dev" commands

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

[#4795] In u-boot trunk, USB dev number mismatch for "usb info" and "usb dev" commands

Submitted By: Vivi Li

Open Date

2009-01-11 23:16:57     Close Date

2009-01-19 22:31:53

Priority:

Medium High     Assignee:

Bryan Wu

Category:

N/A     Fixed In Release:

N/A

Found In Release:

N/A     Status:

Closed

Board:

N/A     Processor:

N/A

Silicon Revision:

    Resolution:

Rejected

Is the bug repeatable?:

N/A     

Summary: In u-boot trunk, USB dev number mismatch for "usb info" and "usb dev" commands

Details:

 

Attach a usb memory device to bf527.

For "usb info" command, dev number is 1; for "usb dev" command, dev number is 0.

The dev number mismatch.

 

--

bfin> help usb

usb reset - reset (rescan) USB controller

usb stop [f]  - stop USB [f]=force stop

usb tree  - show USB device tree

usb info [dev] - show available USB devices

usb storage  - show details of USB storage devices

usb dev [dev] - show or set current USB storage device

usb part [dev] - print partition table of one or all USB storage devices

usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'

    to memory address `addr'

 

bfin> usb info 0

config for device 0

*** NO Device avaiable ***

bfin> usb info 1

config for device 1

1: Mass Storage,  USB Revision 2.0

- SanDisk U3 Cruzer Micro 4317120CA6003D0E

- Class: (from Interface) Mass Storage

- PacketSize: 64  Configurations: 1

- Vendor: 0x0781  Product 0x5406 Version 2.0

   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

 

bfin>

bfin> usb dev 0

 

USB device 0:

    Device 0: Vendor: SanDisk  Rev: 7.01 Prod: Cruzer

            Type: Removable Hard Disk

            Capacity: 971.9 MB = 0.9 GB (1990655 x 512)

... is now current device

bfin> usb dev 1

 

USB device 1:

    Device 1: Vendor:  Rev:  Prod:

            Type: Hard Disk

            Capacity: not available

... is now current device

bfin>

--

 

Follow-ups

 

--- Bryan Wu                                                 2009-01-14 05:50:01

It's confusing here, but actually it is not a bug.

 

Normally, usb dev 0 is the root hub of the usb system. The first usb mass

storage device is the usb dev 1. So in command 'usb info', dev 0 has no config

but dev 1 has mass storage config info.

 

But 'usb dev' command try to show the info of current USB storage device. The

roothub is not included in the USB storage device, so usb dev 0 is usb storage

device and no dev 1.

 

I suggest just use "usb info" and "usb dev", no need to set

the dev number here:

--

bfin> usb info

1: Mass Storage,  USB Revision 2.0

- SanDisk Corporation U3 Cruzer Micro 000016244373FFB4

- Class: (from Interface) Mass Storage

- PacketSize: 64  Configurations: 1

- Vendor: 0x0781  Product 0x5406 Version 0.16

   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 1 Out Bulk MaxPacket 512

 

bfin> usb dev

 

USB device 0: Vendor: SanDisk  Rev: 2.21 Prod: U3 Cruzer Micro

            Type: Removable Hard Disk

            Capacity: 979.8 MB = 0.9 GB (2006673 x 512)

---

 

-Bryan

 

--- Bryan Wu                                                 2009-01-15 22:27:36

I found the MUSB driver missed roothub control code. So we cannot see the dev 0

root hub config info. I will try to add it.

 

-Bryan

 

--- Bryan Wu                                                 2009-01-19 05:11:17

I already added the root hub control:

 

---

U-Boot 2008.10-svn1603 (ADI-2009R1-pre) (Jan 19 2009 - 18:03:37)

 

CPU:   ADSP bf548-0.0 (Detected Rev: 0.1) (parallel flash boot)

Board: ADI BF548 EZ-Kit board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz

RAM:   64 MB

Flash: 16 MB

NAND:  256 MiB

*** Warning - bad CRC, using default environment

 

In:    serial

Out:   serial

Err:   serial

Net:   Hit any key to stop autoboot:  0

smc911x: initializing

smc911x: detected LAN9218 controller

smc911x: phy initialized

smc911x: MAC 00:e0:22:fe:b9:55

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'uImage'.

Load address: 0x1000000

Loading: *

Abort

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices... 2 USB Device(s) found

       scanning bus for storage devices... 1 Storage Device(s) found

bfin> usb info

1: Hub,  USB Revision 2.0

-  MUSB Root Hub

- Class: Hub

- PacketSize: 8  Configurations: 1

- Vendor: 0x0000  Product 0x0000 Version 0.0

   Configuration: 1

   - Interfaces: 1 Self Powered 0mA

     Interface: 0

     - Alternate Setting 0, Endpoints: 1

     - Class Hub

     - Endpoint 1 In Interrupt MaxPacket 512 Interval 255ms

 

2: Mass Storage,  USB Revision 2.0

- SanDisk Corporation U3 Cruzer Micro 000016244373FFB4

- Class: (from Interface) Mass Storage

- PacketSize: 64  Configurations: 1

- Vendor: 0x0781  Product 0x5406 Version 0.16

   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 1 Out Bulk MaxPacket 512

 

bfin> usb tree

 

Device Tree:

  1  Hub (12MBit/s, 0mA)

  |   MUSB Root Hub

  |

  +-2  Mass Storage (480MBit/s, 200mA)

       SanDisk Corporation U3 Cruzer Micro 000016244373FFB4

    

bfin> usb dev

 

USB device 0: Vendor: SanDisk  Rev: 2.21 Prod: U3 Cruzer Micro

            Type: Removable Hard Disk

            Capacity: 979.8 MB = 0.9 GB (2006673 x 512)

bfin> usb part

print_part of 0

 

Partition Map for USB device 0  --   Partition Type: DOS

 

Partition     Start Sector     Num Sectors     Type

    1                   63         2006610       b

 

print_part of 1

## Unknown partition table

 

print_part of 2

## Unknown partition table

 

print_part of 3

## Unknown partition table

 

print_part of 4

## Unknown partition table

bfin> usb stor

  Device 0: Vendor: SanDisk  Rev: 2.21 Prod: U3 Cruzer Micro

            Type: Removable Hard Disk

            Capacity: 979.8 MB = 0.9 GB (2006673 x 512)

---

 

And according to USB spec, usb dev 0 is reserved, dev 1 is root hub, dev 2 here

is the storage device. But usb dev 2 is device 0 for the usb storage driver.

 

Please close this bug.

Thanks

-Bryan

 

--- Vivi Li                                                  2009-01-19 22:31:53

OK, close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes