industrialNETworXnetx

matias | 17.02.2009 | 17:46 | 2 replies

USB Mass storage problem

Hi, in my WinCE500 image running on custom hardware i have the following problem:
i try to test usb host capabilities of Netx mounting an USB mass storage device into the filesystem.
I have added the Netx usb host controller driver and Usb host support (as pointed out into Wince BSP doc) into my image.
I have checked out that the registry entry of usb was into the regini.ini and the dll is correctly loaded, but when i insert a USB key into my hardware the driver response il the following:

4294807998 PID:c72e4442 TID:71ffe62 0x871ffc20: CRootHub::SetOrClearFeature - port = 1, set/clear = 0x1, feature = 0x10, FAILED
4294807998 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0001, status = 0x0001
4294808100 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::HubStatusChangeThread - device attached on port 1
4294808100 PID:c72e4442 TID:71ffe62 0x871ffc20: +CHub(Root tier 0)::AttachDevice - port = 1, fIsLowSpeed = 0
4294808101 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_OPENING_ENDPOINT0_PIPE, failures = 0
4294808101 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_USING_ADDRESS0, failures = 0
4294808102 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_RESET_AND_ENABLE_PORT, failures = 0
4294808113 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_GET_DEVICE_DESCRIPTOR_TEST, failures = 0
4294808116 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_SET_ADDRESS, failures = 0
4294808119 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_LEAVE_ADDRESS0, failures = 0
4294808131 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_GET_INITIAL_DEVICE_DESCRIPTOR, failures = 0
4294808134 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_GET_DEVICE_DESCRIPTOR, failures = 0
4294808138 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SETUP_CONFIGURATION_DESCRIPTOR_ARRAY, failures = 0
4294808139 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_GET_INITIAL_CONFIG_DESCRIPTOR, failures = 0
4294808142 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_GET_CONFIG_DESCRIPTOR, failures = 0
4294808146 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_DETERMINE_CONFIG_TO_CHOOSE, failures = 0
4294808147 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - Select Configuration 0 on DEVICE_CONFIG_STATUS_DETERMINE_CONFIG_TO_CHOOSE step
4294808147 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SCHEDULING_SET_CONFIG, failures = 0
4294808150 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_CREATE_NEW_FUNCTION, failures = 0
4294808151 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_INSERT_NEW_DEVICE_INTO_UPSTREAM_HUB_PORT_ARRAY, failures = 0
4294808151 PID:c72e4442 TID:71ffe62 0x871ffc20: CHub(Root tier 0)::AttachDevice - status = DEVICE_CONFIG_STATUS_SIGNAL_NEW_DEVICE_ENTER_OPERATIONAL_STATE, failures = 0
4294808177 PID:c72e4442 TID:71ffe62 0x871ffc20: >>> Loading module usbmsc.dll at address 0x03990000-0x039A2000 (RW data at 0x01F8F000-0x01F8F508)
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\NETXIMAGE\RELDIR\NETXBSP_ARMV4I_DEBUG\USBMSC.DLL'
4294808215 PID:c72e4442 TID:71ffe62 0x871ffc20: +USBD:OpenPipe, EP: 0x1, MaxPkt: 64, Type: Bulk
4294808216 PID:c72e4442 TID:71ffe62 0x871ffc20: -USBD:OpenPipe success, hPipe = 4B050
4294808227 PID:c72e4442 TID:71ffe62 0x871ffc20: +USBD:OpenPipe, EP: 0x82, MaxPkt: 64, Type: Bulk
4294808228 PID:c72e4442 TID:71ffe62 0x871ffc20: -USBD:OpenPipe success, hPipe = 4B410
4294808239 PID:c72e4442 TID:71ffe62 0x871ffc20: +USBD:OpenPipe, EP: 0x83, MaxPkt: 64, Type: Interrupt
4294808240 PID:c72e4442 TID:71ffe62 0x871ffc20: -USBD:OpenPipe success, hPipe = 4B7E0
4294808249 PID:c72e4442 TID:71ffe62 0x871ffc20: >>> Loading module usbdisk6.dll at address 0x03970000-0x03984000 (RW data at 0x01F8D000-0x01F8D524)
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\NETXIMAGE\RELDIR\NETXBSP_ARMV4I_DEBUG\USBDISK6.DLL'
4294808279 PID:c72e4442 TID:71ffe62 0x871ffc20: DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\USB\ClientDrivers\Mass_Storage_Class\6\BusPrefix) returned 2
4294808299 PID:872f0fc6 TID:272cc8be 0x87395400: AddToProcessInputLocaleTable: Added process to ProcessInputLocale table, hProcess = 0xC72E4442
4294808302 PID:c72e4442 TID:67369fce 0x87395640: Unsupported IOCTL:0x71c24
4294808302 PID:c72e4442 TID:67369fce 0x87395640: DSK_IOControl error: 50
4294808306 PID:67395bfa TID:67369fce 0x87395640: Loading partition driver mspart.dll hModule=871FA000
4294808307 PID:67395bfa TID:67369fce 0x87395640: Driver mspart.dll loaded
4294808414 PID:c72e4442 TID:7205fa2 0x87205000: HandleInTransfer(): Incoming Data does not fit into Buffer. Packet cut off! (Recv:64, BufferSize=13)
4294808415 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0xc, dwTimeout:4000)
4294808415 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808417 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808417 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808420 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808421 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808423 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808423 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808426 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer warning(6.7.x.3, RequestLength:18 TransferLength:18 Err:0 UsbErr:0x103, dwTimeout:5000)
4294808427 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808428 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808430 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808430 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808432 PID:c72e4442 TID:67369fce 0x87395640: ScsiGetSenseData - SenseKey:0x0 ASC:0x2 ASCQ:0x8
4294808433 PID:c72e4442 TID:67369fce 0x87395640: ScsiTestUnitReady ERROR:0
4294808434 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer warning(6.7.x.3, RequestLength:18 TransferLength:18 Err:0 UsbErr:0x103, dwTimeout:5000)
4294808435 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808435 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808438 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808438 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808440 PID:c72e4442 TID:67369fce 0x87395640: ScsiGetSenseData - SenseKey:0x0 ASC:0x2 ASCQ:0x8
4294808441 PID:c72e4442 TID:67369fce 0x87395640: ScsiReadWrite ERROR:31
4294808553 PID:c72e4442 TID:7205fa2 0x87205000: HandleInTransfer(): Incoming Data does not fit into Buffer. Packet cut off! (Recv:64, BufferSize=13)
4294808554 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0xc, dwTimeout:4000)
4294808554 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808557 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808557 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808560 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808561 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808563 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808563 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808566 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer warning(6.7.x.3, RequestLength:18 TransferLength:18 Err:0 UsbErr:0x103, dwTimeout:5000)
4294808567 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808568 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808570 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808570 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808572 PID:c72e4442 TID:67369fce 0x87395640: ScsiGetSenseData error:31
4294808573 PID:c72e4442 TID:67369fce 0x87395640: ScsiTestUnitReady ERROR:31
4294808584 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808585 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808587 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808587 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808590 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer warning(6.7.x.3, RequestLength:18 TransferLength:18 Err:0 UsbErr:0x103, dwTimeout:5000)
4294808591 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808592 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808594 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808594 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808597 PID:c72e4442 TID:67369fce 0x87395640: ScsiGetSenseData error:31
4294808598 PID:c72e4442 TID:67369fce 0x87395640: ScsiTestUnitReady ERROR:31
4294808609 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808610 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW
4294808612 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808612 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
4294808615 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer warning(6.7.x.3, RequestLength:18 TransferLength:18 Err:0 UsbErr:0x103, dwTimeout:5000)
4294808616 PID:c72e4442 TID:67369fce 0x87395640: BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x103, dwTimeout:4000)
4294808617 PID:c72e4442 TID:67369fce 0x87395640: Retry CSW

What's the problem??

Thank's in advance.

Matias

MT | 18.02.2009 | 07:25

Hi Matias,

First of all, it is helpful to port the Version of the BSP you are using.

Now to your question:

I remember there was once a bug in the USB Mass Storage drivers from CE that occured on USB Sticks that were not able to handle one of the Query/Sense Status Commands (There are two of them). The internal problem of the mass controller driver was, that is has sent a CSD to the stick and passed a short pointer for receiving the CSW. This is what I think is happening with your stick (see log entry : "4294808414 PID:c72e4442 TID:7205fa2 0x87205000: HandleInTransfer(): Incoming Data does not fit into Buffer. Packet cut off! (Recv:64, BufferSize=13)")

A workaround was introduced in the USB Host controller driver against this problem, but with one of the QFE's this bug was fixed and the workaround now disallows these USB sticks to be used.

But I cannot attach the latest development version of the USB Host controller driver here, so you need to get in contact with the Hilscher netX support. They can send you the latest version to test if this fixes the issue.

Regards

MT

wangl | 01.12.2009 | 02:56

matias ,do you solve this problem?

Login

Registration
netX Community Day

When
March 25th, 2010
10:00 - 17:00

Where
Automation day
D-Böblingen

Registration required …