Re: USB Mass Storage problems/5.0

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Thats me (peter.dierckx_at_REMOVE_NOSPAMtransics.com)
Date: 10/12/04


Date: Tue, 12 Oct 2004 14:23:38 +0200

Hi K.M.,

I'm having a similar problem on Windows CE 4.2 with a USB Digital Camera
which stores pictures in Flash memory.
When I debug the USBMSC.DLL and USBDISK6.DLL drivers I get the following
debug info:

THCD: Dev.bDeviceClass = 0x00
THCD: Dev.bDeviceSubClass = 0x00
THCD: Dev.bDeviceProtocol = 0x00
THCD: Dev.idVendor = 0x2770
THCD: Dev.idProduct = 0x915D
THCD: Dev.bcdDevice = 0x0010
THCD: Dev.iManufacturer = 0x00
THCD: Dev.iProduct = 0x01
THCD: Dev.iSerialNumber = 0x02
THCD: Int.bInterfaceClass = 0x08 ==> MASS STORAGE DEVICE CLASS
THCD: Int.bInterfaceSubClass = 0x06 ==> SCSI interface
THCD: Int.bInterfaceProtocol = 0x50
Loaded symbols for
'C:\WINCE420\PUBLIC\QUAT420\RELDIR\QUATTOIII_BSP_ARMV4IRELEASE\USBMSC.DLL'
Loaded symbols for
'C:\WINCE420\PUBLIC\QUAT420\RELDIR\QUATTOIII_BSP_ARMV4IRELEASE\USBDISK6.DLL'
Command Block Status: Command Failed
ScsiGetSenseData - SenseKey:0x6 ASC:0x28 ASCQ:0x0
SENSE_UNIT_ATTENTION : ASC_MEDIA_CHANGED
ScsiTestUnitReady ERROR:20
ScsiUnitAttention:20
Command Block Status: Command Failed
ScsiGetSenseData - SenseKey:0x2 ASC:0x3a ASCQ:0x0
SENSE_NOT_READY : ASC_MEDIUM_NOT_PRESENT
ScsiTestUnitReady ERROR:20
ScsiUnitAttention:20
Command Block Status: Command Failed
ScsiGetSenseData - SenseKey:0x2 ASC:0x3a ASCQ:0x0
SENSE_NOT_READY : ASC_MEDIUM_NOT_PRESENT
ScsiTestUnitReady ERROR:20
ScsiUnitAttention:20
Command Block Status: Command Failed
ScsiGetSenseData - SenseKey:0x2 ASC:0x3a ASCQ:0x0
SENSE_NOT_READY : ASC_MEDIUM_NOT_PRESENT
ScsiTestUnitReady ERROR:20
ScsiUnitAttention:20

And these errors keep coming...
As you can see my device has the same interface as yours (Mass Storage
Device Class with interfaceSubClass = 6 (SCSI))

My guess is that there is NO support in windows CE 4.2 and 5.0 for this SCSI
interface.

With the interfaceSubClass = 2 (= ATAPI) interface I have no problems, the
USBDisk6.dll starts the FAT file system driver and my drive appears in
explorer, but with the SCSI interface I get only errors.

Does any one have a solution for this?
Where can we find the SCSI driver for CE 4.2 and 5.0 to support our USB
drives?

All help is highly apreciated.
Thanks a lot,
Peter.

"KM" <konstmor@nospam_yahoo.com> wrote in message
news:uCXs7n%23rEHA.3608@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am having various issues with a number of USB Flash Key disks under CE
4.2/5.0. Please let me narrow the list down to 5.0 only
> here.
>
> Some device are not recognized by CE USB Mass Storage Driver. I know it is
not a firmware problem as the devices work properly on my
> XP machine (or, at least, XP has some fixes for such devices which CE does
not).
> The Usbmsc driver however works properly with some other USB keys.
>
> I am talking about devices that comply with the USB specification
(bInterfaceSubClass=6, bInterfaceProtocol=80).
> I turned on debug messages in the USB stack (and particularly in the USB
Storage class driver). All of the "bad" devices show
> different failures but here is one of them: "Command Block Status: Command
Failed. Error: 0" (as you can imagine, this happens right
> after "5.3.3 CSW") (if interested, feel free to request a full debug
output log from me, I can email it over).
>
> Just to avoid question on what interface descriptor for those devices,
here is the debug output:
> USB_INTERFACE_DESCRIPTOR[0]:
> -------------------------
> bLength: 0x9
> bDescriptorType: 0x4
> bInterfaceNumber: 0x0
> bAlternateSetting: 0x0
> bNumEndpoints: 0x2
> bInterfaceClass: 0x8
> bInterfaceSubClass: 0x6
> bInterfaceProtocol: 0x50
> iInterface: 0x0
>
> Basically what happens when I plug-in one of the "bad" devices it that
after some recognition process and failures on Command Block
> transfer for a few tries, it ends up by disk access error ("DSK_Open:
ERROR_ACCESS_DENIED") and then removing the device
> ("USBMSC<RemoveDeviceContext").
>
> The fact that all the USB keys I am playing with here (e.g., Lexar Media
256M Jumpdrive) are not "new" devices and have been on the
> market for a while, tells me that it is most likely a CE problem rather
than particular hardware failures. And again, the keys work
> perfectly with XP.
>
> I am really wondering why CE 5.0 USB MSC driver is under
Production-Quality group of drivers then?
>
> So, my question would be:
> 1) Has anyone seen similar USB Mass Storage Driver problems recognizing
some brands?
>
> 2) Any ideas on where me better start exploring the USB stack code? What
to look for?
> Maybe it is the protocol implementation issues or etc.? Do I need to
trace all the commands being sent to the failed device?
>
> 3) Sometimes I see that Lexar, for instance, fails to pass the TEST UNIT
READY USB command. Has anybody seen this sort of problems?
> I could fix it by restarting (stop and start again) the device within the
ScsiUnitAttention function and then send the command
> second time. Then the firmware returned a successful code.
>
> 4) On the Lexar 256MB key hot plug-in, right after the TEST UNIT READY is
done, the GetTransferStatus starts failing with UsbError
> code 0x5. (Did I mention this is all undocumented? :-( ). The error code
from a system header file matches to
> USB_DEVICE_NOT_RESPONDING_ERROR, which does not say much to me. Does
anybody know what this error means?
>
> 5) If I use Lexar 128Mb, I am getting USB_STALL_ERROR (0x4) error code
there but it finally gets through with some cleaning USB
> command procedure (my guess was it was one of the fixes in 5.0).
>
> Just to mention.. The USB debug output is huge and hard to follow. I am
not good with USB drivers' implementation and don't know yet
> where the best to start. I'd appreciate it very much for pointing out a
good debug or workaround directions.
>
> Thank you in advance for any valuable input.
>
> --
> Regards,
> KM
>
>



Relevant Pages