[U-Boot] USB storage problem with SCSI commands

Alexander Varnin fenixk19 at mail.ru
Sun Jan 24 10:45:35 CET 2010


Hello. I'm making custom version of u-boot for our device, based on
1.1.6. I can't get usb storage to work. My usb host successfully gets
initiated, finds storage device, and fails to connect it. The problem
probably is on SCSI commands level. In usb storage driver(file
common/usb_storage.c), there is the function usb_stor_get_info(). It
sends different SCSI commands. I got the following things. Inquiry
command passes well. In the source version, there was test_unit_ready
command, that failed every time. I've tried to place it before inquiry,
and i also have tried to place request_sense before them all. These
commands failed, and caused device to disconnect, so no more commands
can be passed. What can be problem, that makes these commands fail? Usb
flash stick works good with Linux.

Here is some debug output.

Test unit ready:

    COMMAND phase
    cbw.dCBWSignature == 43425355
    CBWSIGNATURE==43425355
      td->hwBE == 33fffda6  td->hwCBP == 33fffd88   td->hwNextTD == 33e55580
    STATUS phase
      td->hwBE == 33fffde8  td->hwCBP == 33fffddc   td->hwNextTD == 33e555c0
    dCSWSignature == 53425355
     dCSWTag == 0
    dCSWDataResidue == 0
    bCSWStatus == 1
    ptr[0] 0x55 ptr[1] 0x53 ptr[2] 0x42 ptr[3] 0x53 ptr[4] 0x0 ptr[5]
    0x0 ptr[6] 0x0 ptr[7
    FAILED


Request sense:

    COMMAND phase
      td->hwBE == 33fffda6  td->hwCBP == 33fffd88   td->hwNextTD == 33e55580
    DATA phase
      td->hwBE == 33e525d5  td->hwCBP == 33e525c4   td->hwNextTD == 33e555c0
    stat = USB_ST_CRC_ERR;
    usb_bulk_msg error status 32

Inquiry:

    COMMAND phase
      td->hwBE == 33fffdb6  td->hwCBP == 33fffd98   td->hwNextTD == 33e55580
    DATA phase
      td->hwBE == 33e523d7  td->hwCBP == 33e523b4   td->hwNextTD == 33e555c0
    pdata[0] 0x0 pdata[1] 0x80 pdata[2] 0x0 pdata[3] 0x1 pdata[4] 0x1f
    pdata[5] 0x0 pdata[
    STATUS phase
      td->hwBE == 33fffdf8  td->hwCBP == 33fffdec   td->hwNextTD == 33e55500
    dCSWSignature == 53425355
     dCSWTag == 0
    dCSWDataResidue == 0
    bCSWStatus == 0
    ptr[0] 0x55 ptr[1] 0x53 ptr[2] 0x42 ptr[3] 0x53 ptr[4] 0x0 ptr[5]
    0x0 ptr[6] 0x0 ptr[7
     inquiry returns 0
    vendor:        
    product: silicon-power  
    revision: PMAP
     type == 0
    ISO Vers 0, Response Data 1





More information about the U-Boot mailing list