I was trying to implement mass storage device on USB function controller
driver on Windows CE 5.0. After configuring the registry USB function
controller driver for Mass storage class and connected the device, I found
that one of the command in mass storage READ_FORMAT_CAPACITY (0x23) was not
supported. I got the debug messages as below:

UsbMsFn!STORE_IsCommandSupported: ++
UsbMsFn!STORE_IsCommandSupported: command 0x23
UsbMsFn!STORE_IsCommandSupported: unsupported command 0x23
UsbMsFn!STORE_IsCommandSupported: --
UsbMsFn!BOT_HandleCBW: command not supported

in the mass storage code i found that there was no implementation of the
code for this READ FORMAT CAPACITY command. After this command was not
processed, the endpoint was stalled and the bus was reset by the USB host.
After I hard coded with the READ FORMAT CAPACITY.
there is another problem when i tried to write into the SDMMC card which is
the mass storage device. it is failing to write into that SDMMC. and the
memory property showing the device has zero memory and zero used space( this
is happening when i am trying to write into the mass storage device ).

thanks

RE: usb mass storage client driver by AsangDani

AsangDani
Fri Jun 24 02:16:10 CDT 2005

*READ_FORMAT_CAPACITIES* is not a standard SCSI-2 command. It's marked as
Vendor-Specific in SCSI SPC r11-a. It's part of USB Mass Storage Class UFI
specification (pp 33)

http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf

Please go through the CDB format and reply to it correctly. All UFI devices
should implement this command. Your function driver will work as expected.

--
Asang Dani


"jt" wrote:

> I was trying to implement mass storage device on USB function controller
> driver on Windows CE 5.0. After configuring the registry USB function
> controller driver for Mass storage class and connected the device, I found
> that one of the command in mass storage READ_FORMAT_CAPACITY (0x23) was not
> supported. I got the debug messages as below:
>
> UsbMsFn!STORE_IsCommandSupported: ++
> UsbMsFn!STORE_IsCommandSupported: command 0x23
> UsbMsFn!STORE_IsCommandSupported: unsupported command 0x23
> UsbMsFn!STORE_IsCommandSupported: --
> UsbMsFn!BOT_HandleCBW: command not supported
>
> in the mass storage code i found that there was no implementation of the
> code for this READ FORMAT CAPACITY command. After this command was not
> processed, the endpoint was stalled and the bus was reset by the USB host.
> After I hard coded with the READ FORMAT CAPACITY.
> there is another problem when i tried to write into the SDMMC card which is
> the mass storage device. it is failing to write into that SDMMC. and the
> memory property showing the device has zero memory and zero used space( this
> is happening when i am trying to write into the mass storage device ).
>
> thanks

RE: usb mass storage client driver by jt

jt
Sun Jun 26 08:58:02 CDT 2005

Thanks for your reply
I have implemented the READ FORMAT CAPACITY
after implementation it is working fine and the hard disk is comming up
but the problem is that if i try to wirte into the hard disk (mass storage
devcie )
the write command from the host is comming and the in the debug message i am
finding that it is a correct command but when i am cerating a folder or
copying a file to the hard drive from my desktop i am not able to write into
that removable hard drive and also after the writing process over the memory
containt shown by the removable drive becomes zero used and zero memory space
available
please tell me is there anything i am missing in the process or in the
registry entries(i took the reg entry from the common.reg)
tell me any solutuion for the write process.
Advance thanks to u.
jt

Asang Dani" wrote:

> *READ_FORMAT_CAPACITIES* is not a standard SCSI-2 command. It's marked as
> Vendor-Specific in SCSI SPC r11-a. It's part of USB Mass Storage Class UFI
> specification (pp 33)
>
> http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf
>
> Please go through the CDB format and reply to it correctly. All UFI devices
> should implement this command. Your function driver will work as expected.
>
> --
> Asang Dani
>
>
> "jt" wrote:
>
> > I was trying to implement mass storage device on USB function controller
> > driver on Windows CE 5.0. After configuring the registry USB function
> > controller driver for Mass storage class and connected the device, I found
> > that one of the command in mass storage READ_FORMAT_CAPACITY (0x23) was not
> > supported. I got the debug messages as below:
> >
> > UsbMsFn!STORE_IsCommandSupported: ++
> > UsbMsFn!STORE_IsCommandSupported: command 0x23
> > UsbMsFn!STORE_IsCommandSupported: unsupported command 0x23
> > UsbMsFn!STORE_IsCommandSupported: --
> > UsbMsFn!BOT_HandleCBW: command not supported
> >
> > in the mass storage code i found that there was no implementation of the
> > code for this READ FORMAT CAPACITY command. After this command was not
> > processed, the endpoint was stalled and the bus was reset by the USB host.
> > After I hard coded with the READ FORMAT CAPACITY.
> > there is another problem when i tried to write into the SDMMC card which is
> > the mass storage device. it is failing to write into that SDMMC. and the
> > memory property showing the device has zero memory and zero used space( this
> > is happening when i am trying to write into the mass storage device ).
> >
> > thanks

RE: usb mass storage client driver by AsangDani

AsangDani
Sun Jun 26 10:10:04 CDT 2005

Please include those debug messages.

--
Asang Dani


"jt" wrote:

> Thanks for your reply
> I have implemented the READ FORMAT CAPACITY
> after implementation it is working fine and the hard disk is comming up
> but the problem is that if i try to wirte into the hard disk (mass storage
> devcie )
> the write command from the host is comming and the in the debug message i am
> finding that it is a correct command but when i am cerating a folder or
> copying a file to the hard drive from my desktop i am not able to write into
> that removable hard drive and also after the writing process over the memory
> containt shown by the removable drive becomes zero used and zero memory space
> available
> please tell me is there anything i am missing in the process or in the
> registry entries(i took the reg entry from the common.reg)
> tell me any solutuion for the write process.
> Advance thanks to u.
> jt
>
> Asang Dani" wrote:
>
> > *READ_FORMAT_CAPACITIES* is not a standard SCSI-2 command. It's marked as
> > Vendor-Specific in SCSI SPC r11-a. It's part of USB Mass Storage Class UFI
> > specification (pp 33)
> >
> > http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf
> >
> > Please go through the CDB format and reply to it correctly. All UFI devices
> > should implement this command. Your function driver will work as expected.
> >
> > --
> > Asang Dani
> >
> >
> > "jt" wrote:
> >
> > > I was trying to implement mass storage device on USB function controller
> > > driver on Windows CE 5.0. After configuring the registry USB function
> > > controller driver for Mass storage class and connected the device, I found
> > > that one of the command in mass storage READ_FORMAT_CAPACITY (0x23) was not
> > > supported. I got the debug messages as below:
> > >
> > > UsbMsFn!STORE_IsCommandSupported: ++
> > > UsbMsFn!STORE_IsCommandSupported: command 0x23
> > > UsbMsFn!STORE_IsCommandSupported: unsupported command 0x23
> > > UsbMsFn!STORE_IsCommandSupported: --
> > > UsbMsFn!BOT_HandleCBW: command not supported
> > >
> > > in the mass storage code i found that there was no implementation of the
> > > code for this READ FORMAT CAPACITY command. After this command was not
> > > processed, the endpoint was stalled and the bus was reset by the USB host.
> > > After I hard coded with the READ FORMAT CAPACITY.
> > > there is another problem when i tried to write into the SDMMC card which is
> > > the mass storage device. it is failing to write into that SDMMC. and the
> > > memory property showing the device has zero memory and zero used space( this
> > > is happening when i am trying to write into the mass storage device ).
> > >
> > > thanks

RE: usb mass storage client driver by jt

jt
Mon Jun 27 00:04:01 CDT 2005

thanks for the reply.
I have attached the log for the WRITE (10) command sent by the host to
device when i am trying to write into the device.
....................................................................................................................

UsbMsFn!ProcessBOPipeTransfer: ++
UsbMsFn!ProcessBOPipeTransfer: Received data block
UsbMsFn!BOT_HandleCBW: ++
UsbMsFn!BOT_ExecuteCB: ++
UsbMsFn!STORE_ExecuteCommand: ++
UsbMsFn!STORE_IsCommandSupported: ++
UsbMsFn!STORE_IsCommandSupported: command 0x2a
UsbMsFn!STORE_IsCommandSupported: WRITE (10)
UsbMsFn!STORE_IsCommandSupported: --
UsbMsFn!STORE_ExecuteCommand: command 0x2a
UsbMsFn!STORE_ExecuteCommand: WRITE (10)
UsbMsFn!ProcessScsiWrite10: starting LBA/sector = 32, transfer length = 1
(sectors)
UsbMsFn!ProcessScsiWrite10: IOCTL_DISK_WRITE passed; 8 bytes read
UsbMsFn!STORE_ExecuteCommand: --
UsbMsFn!BOT_ExecuteCB: Command : passed
UsbMsFn!BOT_ExecuteCB: --
UsbMsFn!ChangeMscState: State change: data out transport -> status transport
UsbMsFn!BOT_BuildCSW: ++
UsbMsFn!BOT_BuildCSW: --
UsbMsFn!BOT_SetupTx: ++
UsbFnMdd!UfnMdd_IssueTransfer: ++
UsbFnMdd!CPipe::IssueTransfer: ++
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 1
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 2
UsbFnMdd!CPipe::IssueTransfer: Issuing IN transfer (0x004b7fcc) on ep 1
(0x81) for 13 bytes
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 3
MX21!UfnPdd_IssueTransfer: ++
pvTransfer address: 0x4B7FE4 cbBuffer: 0xD cbTransferred:0x0
MX21!StartTransfer: ++
dwEndPointNumber: 0x1
Handle Tx :Tx : pTransfer: 0x4B7FE4 pvBuffer: 0x1F2487C cbBuffer: 0xD
cbTransferred: 0x0
MX21!USB_TxIntHandler: ++
TX bytes= 0xD
MX21!FUN_EPConfig: ++
MX21!FUN_EPConfig: --
MX21!USB_TxIntHandler: --
MX21!StartTransfer: --
MX21!UfnPdd_IssueTransfer: --
UsbFnMdd!CPipe::IssueTransfer: --
UsbFnMdd!UfnMdd_IssueTransfer: --
UsbMsFn!BOT_SetupTx: --
UsbMsFn!BOT_HandleCBW: --
UsbMsFn!ProcessBOPipeTransfer: --
WAIT_OBJECT_0
MX21!FUN_GetInterruptType: ++
MX21!FUN_I2C_General_Interrupt_Handler: ++
MX21!FUN_I2C_General_Interrupt_Handler: --
MX21!FUN_GetInterruptType: --
FUN_GetInterruptType 0x38F480, 0x1
MX21!USB_LineIntHandler: ++
UsbFnMdd!UfnMdd_Notify: ++
UsbFnMdd!UfnMdd_Notify: Root port reset
UsbFnMdd!ChangeDeviceState: State change: configured -> default
UsbFnMdd!CloseAllPipesExceptEndpointZero: ++
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 4
UsbFnMdd!CPipe::AbortTransfer: Aborting transfer 0x004b7fcc on pipe at
address 1 (0x00390078)
MX21!UfnPdd_AbortTransfer: ++
MX21!CompleteTransfer: ++
Complete tfrB4:TRx: pTransfer: 0x4B7FE4 pvBuffer: 0x1F2487C cbBuffer: 0xD
cbTransferred: 0xD dwUsbError: 0x101
UsbFnMdd!UfnMdd_Notify: ++
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 5
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 4
UsbFnMdd!CPipe::TransferComplete: Completing transfer 0x004b7fcc on pipe
at address 1 (0x00390078)
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 3
BOT DefaultTransferComplete setting event
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 2
UsbFnMdd!UfnMdd_Notify: --
MX21!CompleteTransfer: --
MX21!UfnPdd_AbortTransfer: --
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 1
MX21!UfnPdd_DeinitEndpoint: ++
MX21!UfnPdd_DeinitEndpoint: --
UsbFnMdd!CPipe::Close: Closed pipe (0x00390078): physical address 1, bus
address 0x81
MX21!UfnPdd_DeinitEndpoint: ++
MX21!UfnPdd_DeinitEndpoint: --
UsbFnMdd!CPipe::Close: Closed pipe (0x003900f0): physical address 2, bus
address 0x02
UsbFnMdd!CloseAllPipesExceptEndpointZero: --
UsbMsFn!BOT_DeviceNotify: ++
UsbMsFn!BOT_ResetPipeState: ++
UsbMsFn!BOT_ResetPipeState: --
UsbMsFn!BOT_ResetPipeState: ++
UsbMsFn!BOT_ResetPipeState: --
UsbMsFn!BOT_ResetPipeState: ++
UsbMsFn!BOT_ResetPipeState: --
UsbFnMdd!UfnMdd_ClosePipe: ++
UsbFnMdd!CPipe::ValidatePipeHandle: Invalid Pipe handle 0x003900f0 (sig
0x506E6655)
UsbFnMdd!UfnMdd_ClosePipe: --
UsbFnMdd!UfnMdd_ClosePipe: ++
UsbFnMdd!CPipe::ValidatePipeHandle: Invalid Pipe handle 0x00390078 (sig
0x506E6655)
UsbFnMdd!UfnMdd_ClosePipe: --
UsbMsFn!ChangeMscState: State change: status transport -> idle
UsbMsFn!BOT_DeviceNotify: --
UsbFnMdd!UfnMdd_Notify: --
UsbFnMdd!UfnMdd_Notify: ++
UsbFnMdd!UfnMdd_Notify: Detached
UsbFnMdd!ChangeDeviceState: State change: default -> detached
UsbFnMdd!CloseAllPipesExceptEndpointZero: ++
UsbFnMdd!CloseAllPipesExceptEndpointZero: --
UsbMsFn!BOT_DeviceNotify: ++
UsbMsFn!STORE_Close: ++
UsbMsFn!STORE_Close: forcing storage manager to re-examine \StoreMgr\DSK1:
UsbMsFn!STORE_Close: --
UsbMsFn!BOT_DeviceNotify: --
UsbFnMdd!UfnMdd_Notify: --
USB Cable Disconnected.
MX21!USB_LineIntHandler: --
UsbMsFn!BOT_TransferThread: Transfer 1
UsbFnMdd!UfnMdd_GetTransferStatus: ++
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 2
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 1
UsbFnMdd!UfnMdd_GetTransferStatus: --
UsbMsFn!BOT_TransferThread: 13 bytes transferred
UsbFnMdd!UfnMdd_CloseTransfer: ++
UsbFnMdd!CUfnMddTransfer::AddRef: Referenced 0x004b7fcc to 2
UsbFnMdd!CPipe::CloseTransfer: Closing transfer 0x004b7fcc on pipe at
address 1 (0x00390078)
: UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 1
UsbFnMdd!CUfnMddTransfer::Release: Dereferenced 0x004b7fcc to 0
UsbFnMdd!CPipe::FreeTransfer: Placing transfer 0x004b7fcc on free list
UsbFnMdd!UfnMdd_CloseTransfer: --

..........................................................................................................................

After writing into the hard drive (removable) from the desktop the debug
process stop at "UsbMsFn!ProcessBOPipeTransfer: --" and also the previously
shown memory of the mass storage device becomes zero.
Then i disconnected my USB cable from the device and it came back to the
normal position.
If any thing u find from the log then intimate me.

Thanks in advance;


"Asang Dani" wrote:

> Please include those debug messages.
>
> --
> Asang Dani
>
>
> "jt" wrote:
>
> > Thanks for your reply
> > I have implemented the READ FORMAT CAPACITY
> > after implementation it is working fine and the hard disk is comming up
> > but the problem is that if i try to wirte into the hard disk (mass storage
> > devcie )
> > the write command from the host is comming and the in the debug message i am
> > finding that it is a correct command but when i am cerating a folder or
> > copying a file to the hard drive from my desktop i am not able to write into
> > that removable hard drive and also after the writing process over the memory
> > containt shown by the removable drive becomes zero used and zero memory space
> > available
> > please tell me is there anything i am missing in the process or in the
> > registry entries(i took the reg entry from the common.reg)
> > tell me any solutuion for the write process.
> > Advance thanks to u.
> > jt
> >
> > Asang Dani" wrote:
> >
> > > *READ_FORMAT_CAPACITIES* is not a standard SCSI-2 command. It's marked as
> > > Vendor-Specific in SCSI SPC r11-a. It's part of USB Mass Storage Class UFI
> > > specification (pp 33)
> > >
> > > http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf
> > >
> > > Please go through the CDB format and reply to it correctly. All UFI devices
> > > should implement this command. Your function driver will work as expected.
> > >
> > > --
> > > Asang Dani
> > >
> > >
> > > "jt" wrote:
> > >
> > > > I was trying to implement mass storage device on USB function controller
> > > > driver on Windows CE 5.0. After configuring the registry USB function
> > > > controller driver for Mass storage class and connected the device, I found
> > > > that one of the command in mass storage READ_FORMAT_CAPACITY (0x23) was not
> > > > supported. I got the debug messages as below:
> > > >
> > > > UsbMsFn!STORE_IsCommandSupported: ++
> > > > UsbMsFn!STORE_IsCommandSupported: command 0x23
> > > > UsbMsFn!STORE_IsCommandSupported: unsupported command 0x23
> > > > UsbMsFn!STORE_IsCommandSupported: --
> > > > UsbMsFn!BOT_HandleCBW: command not supported
> > > >
> > > > in the mass storage code i found that there was no implementation of the
> > > > code for this READ FORMAT CAPACITY command. After this command was not
> > > > processed, the endpoint was stalled and the bus was reset by the USB host.
> > > > After I hard coded with the READ FORMAT CAPACITY.
> > > > there is another problem when i tried to write into the SDMMC card which is
> > > > the mass storage device. it is failing to write into that SDMMC. and the
> > > > memory property showing the device has zero memory and zero used space( this
> > > > is happening when i am trying to write into the mass storage device ).
> > > >
> > > > thanks