USB Mass Storage problems/5.0

From: KM (konstmor_at_nospam_yahoo.com)
Date: 10/11/04


Date: Mon, 11 Oct 2004 16:30:22 -0700

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

  • RE: PATCH: Further aacraid work
    ... currently unanswered email "error recovery and command completion" on ... > Enabling unmasked SIMD FPU exception support... ... > usbcore: registered new driver usbfs ... > USB Universal Host Controller Interface driver v2.2 ...
    (Linux-Kernel)
  • Re: USB Mass Storage problems/5.0
    ... I think many people who are going to struggle with the MS USB code will ... First things I fixed was the Unit Test Ready command that I mentioned in earlier post. ... Removing the CBW error handling we may unstabilize the USBMSC driver so that some ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [opensuse] Olympus VN-4100PC Digital Recorder (OPENSUSE 10.2)
    ... software and I have a windows machine however i refuse to use windows. ... bash: lsub: command not found ... You could write to Olympus for information and maybe try to write a driver. ... I must admit that when I looked into writing a USB driver for an ADF image scanner I found it incomprehensibly complex, but I tried to do it from first principles instead of looking at existing code which probably wasn't the most effective approach. ...
    (SuSE)
  • Re: USB Mass Storage problems/5.0
    ... I'm having a similar problem on Windows CE 4.2 with a USB Digital Camera ... THCD: Dev.bDeviceSubClass = 0x00 ... Command Block Status: Command Failed ... Where can we find the SCSI driver for CE 4.2 and 5.0 to support our USB ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PATCH 0/7] [RFC] Sizing zones and holes in an architecture independent manner V2
    ... RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize ... SCSI device sda: drive cache: write back w/ FUA ... usbcore: registered new driver hub ... hub 1-0:1.0: USB hub found ...
    (Linux-Kernel)