USB storage problem with SCSI commands
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
FAILEDRequest 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 32Inquiry:
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 1Hi,
2010/1/24 Alexander Varnin <[email protected]>:
Quoted 2 lines
Hello. I'm making custom version of u-boot for our device, based on 1.1.6.
Please use a recent version of U-boot. This version is old and outdated.
Quoted 1 line
I can't get usb storage to work.
Would not surprise me. A lot of (USB) fixes have been integrated in U-boot since version 1.1.6.
Kind regards,
Remy
Remy Bohmer ?????:
Quoted 5 lines
Hi,
Please use a recent version of U-boot. This version is old and outdated.
I can't, because this version has been given with samsung SMDK2443 board, and there is some special additions for it, that is not present in main u-boot tree.
Quoted 8 lines
Would not surprise me. A lot of (USB) fixes have been integrated in U-boot since version 1.1.6.
Kind regards,
Remy
As I can see in git, there is not so much changes in common/usb_storage.c file, and I've tested all of them, to fix my problem. And none helped. So I'm using quite actual version of usb-storage subsystem.
Dear Alexander Varnin,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Please use a recent version of U-boot. This version is old and outdated.
I can't, because this version has been given with samsung SMDK2443 board, and there is some special additions for it, that is not present in main u-boot tree.
Then port those additions forward to a current version.
Quoted 7 lines
Quoted 2 lines
Would not surprise me. A lot of (USB) fixes have been integrated in U-boot since version 1.1.6.
As I can see in git, there is not so much changes in
common/usb_storage.cfile, and I've tested all of them, to fix my problem. And none helped. So I'm using quite actual version of usb-storage subsystem.
U-Boot 1.1.6 is 4 years old. Since then, 7489 commits have been checked in, which added 1037072 lines, removed 557110 lines, and changed 479962 lines.
Do yourself and us a favour, and update to current code.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Some people march to the beat of a different drummer. And some people tango!
Wolfgang Denk ?????:
Quoted 8 lines
Dear Alexander Varnin,
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Please use a recent version of U-boot. This version is old and outdated.
Quoted 7 lines
Quoted 4 lines
I can't, because this version has been given with samsung SMDK2443 board, and there is some special additions for it, that is not present in main u-boot tree.
Then port those additions forward to a current version.
It is useless work, because in my version works everything, except the things, that didn't change since 1.1.6.
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Would not surprise me. A lot of (USB) fixes have been integrated in U-boot since version 1.1.6.
As I can see in git, there is not so much changes in
common/usb_storage.cfile, and I've tested all of them, to fix my problem. And none helped. So I'm using quite actual version of usb-storage subsystem.
Quoted 4 lines
U-Boot 1.1.6 is 4 years old. Since then, 7489 commits have been checked in, which added 1037072 lines, removed 557110 lines, and changed 479962 lines.
That means this commits at most is not concerned with usb storage, because the differences from my version contain only spacing changes, added writing support(which is not in my task) and some other minor fixes. I can replace this file(common/usb_storage.c) with modern one, and it won't change the case(I've tried). The lower level of usb stack is device-dependent and works correct on other usb devices(hub, for example). So the problem is not here. Are you still think that my version is not actual?
Quoted 7 lines
Do yourself and us a favour, and update to current code.
Best regards,
Wolfgang Denk
Dear Alexander Varnin,
Quoted 4 lines · In message <[email protected]> you wrote:
U-Boot 1.1.6 is 4 years old. Since then, 7489 commits have been checked in, which added 1037072 lines, removed 557110 lines, and changed 479962 lines.
That means this commits at most is not concerned with usb storage, because the differences from my version contain only spacing changes, added writing support(which is not in my task) and some other minor fixes. I can replace this file(common/usb_storage.c) with modern one, and it won't change the case(I've tried). The lower level of usb stack is device-dependent and works correct on other usb devices(hub, for example). So the problem is not here. Are you still think that my version is not actual?
Frankly, I don't care.
You are using ancient code, and ignore the advice you receive. Such a combination kills all motiviation to spend time and efforts trying to help you.
Good luck.
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The best things in life are for a fee.
Wolfgang Denk ?????:
Quoted 18 lines
Dear Alexander Varnin,
Quoted 5 lines · In message <[email protected]> you wrote:
U-Boot 1.1.6 is 4 years old. Since then, 7489 commits have been checked in, which added 1037072 lines, removed 557110 lines, and changed 479962 lines.
That means this commits at most is not concerned with usb storage, because the differences from my version contain only spacing changes, added writing support(which is not in my task) and some other minor fixes. I can replace this
file(common/usb_storage.c)with modern one, and it won't change the case(I've tried). The lower level of usb stack is device-dependent and works correct on other usbdevices(hub, for example). So the problem is not here. Are you still think that my version is not actual?
Quoted 7 lines
Frankly, I don't care.
You are using ancient code, and ignore the advice you receive. Such a combination kills all motiviation to spend time and efforts trying to help you.
It is sad... The problem is, that it is impossible to follow your advice. So I'll go fixing it myself.
Quoted 5 lines
Good luck.
Wolfgang Denk