Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
Is that possible that HOST controller is getting chked with data
I run into an interesting issue .
My client USB driver sends data to lower level and Timeout is returned.
Meanwhile , USB analyzer log indicates there is not any packet sent from PC
except SOF .
So , My question is Is that possible that HOST controller is getting chked with
data ?
Message 2 of 10 19 Aug 09 02:12
Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
RE: Is that possible that HOST controller is getting chked with data
Besides , Any suggestion to locate the root cause ?
Message 3 of 10 19 Aug 09 13:37
Tim Roberts
xxxxx@probo.com Join Date: 28 Jan 2005
Posts To This List: 5060
Re: Is that possible that HOST controller is getting chked with data
xxxxx@126.com wrote:
I run into an interesting issue .
My client USB driver sends data to lower level and Timeout is returned.
Meanwhile , USB analyzer log indicates there is not any packet sent from PC
except SOF .So , My question is Is that possible that HOST controller is getting chked
with data ?
No. What kind of request are you sending? The USB stack doesn’t do
timeouts. Are you setting your own timer on the request? How long is
the timeout.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Message 4 of 10 19 Aug 09 15:58
Glen Slick
xxxxx@microsoft.com Join Date: 07 Jun 2007
Posts To This List: 87
RE: Is that possible that HOST controller is getting chked with data
Are you sure your analyzer trace display is not configured to hide NAK’s? If
the device is NAK’ing then the device is blocking the transfer. If the analyzer
trace is not configured to hide NAK’s and you don’t see any NAK’s and you only
see SOF’s then most likely the host side endpoint is in a halted error state and
no further transfers for the endpoint will occur on the bus until the endpoint
error halt is cleared via a URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL
request.
Is your device a full-speed device downstream of a high-speed hub? If so do you
see the same issue if you remove the high-speed hub from the topology and attach
the full-speed device directly to a root hub port? (Do you happen to be testing
on an Intel BD82P55 PCH system, in which case there is always a high-speed hub
in the USB topology?) On what OS versions are you seeing this issue? In some
situations a full-speed device downstream of a high-speed hub may encounter
endpoint error halt conditions which may not always be obvious.
Message 5 of 10 20 Aug 09 01:17
Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
RE: Is that possible that HOST controller is getting chked with data
To Roberts ,
Thanks for the reply .
Yes , I call WdfRequestSend with a timout value specified .
At the beginning , Data sending is always successful . Later , it fails and
subsequent calls fail always.
So , it might not be caused by insufficient timeout value .
To Slick,
Thanks also .
NAK is not hidden . I don’t see NAK either , but SOF .
I send data by calling WdfRequestSend and this function returns OK . I
fetch the timout error from completionRoution : NT status was 0xC00000B5, USB
status was 0x00000000.
If the endpoint is halted , I suppose WdfRequestSend should directly return
an EP-related error code.
Also , How can I identify the endpoint status at this time ?
Please feel free to point out my misunderstanding.
Message 6 of 10 20 Aug 09 04:21
Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
RE: Is that possible that HOST controller is getting chked with data
To Slick
As for the 2nd question , My device is high-speed and directly connected to
RootHub. OS version is WinXP+Sp2.
Message 7 of 10 20 Aug 09 13:38
Glen Slick
xxxxx@microsoft.com Join Date: 07 Jun 2007
Posts To This List: 87
RE: Is that possible that HOST controller is getting chked with data
If your device is operating in high-speed mode that rules out TT hub
interactions which can cause issues in some cases and cause endpoints to halt
due to errors.
I couldn’t really be sure why a transfer queued on an endpoint would not appear
on the bus without at least looking at kernel memory dump captured while the
system is in the repro condition. It is possible the endpoint is halted with an
error condition, or possible something else usual has happened.
After transfers for the endpoint stop working you could try sending a
URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL request for the endpoint and then
try transfers again to see if that has any effect on unblocking transfers.
-Glen
Message 8 of 10 21 Aug 09 02:51
Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
RE: Is that possible that HOST controller is getting chked with data
My question is : How can I identify if endpoint is stalled from error code .
Currently ,error code is that NT status was 0xC00000B5, USB status was
0x00000000.
Do we always do the reset whenever this error code happens ? ???
Thanks
Message 9 of 10 21 Aug 09 05:00
Daniel Xie
xxxxxx@126.com Join Date: 13 May 2009
Posts To This List: 173
RE: Is that possible that HOST controller is getting chked with data
Sorry , maybe the above poster makes you misunderstand .
Actually , As for your suggestion , "After transfers for the endpoint stop
working you could try sending a URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL
request for the endpoint and then try transfers again to see if that has any
effect on unblocking transfers. " , my question is : “what times do I send this
reset . Error code is that NT status was 0xC00000B5, USB status was 0x00000000.
You mean I do the reset whenever seeing these error code ?”
Thanks a lot .
Message 10 of 10 21 Aug 09 14:42
Glen Slick
xxxxx@microsoft.com Join Date: 07 Jun 2007
Posts To This List: 87
RE: Is that possible that HOST controller is getting chked with data
I know USB details but I don’t know many WDF details. If you are getting a
0xC00000B5 STATUS_IO_TIMEOUT result I can only assume that something timed out
and canceled the transfer before it completed normally.
If the request was queued inside USBPORT.SYS and was then canceled the URB
status should be set to 0xC0010000 USBD_STATUS_CANCELED by USBPORT.SYS when it
completed the canceled request.
If you are not seeing a URB status of 0xC0010000 USBD_STATUS_CANCELED when you
see the Irp status of 0xC00000B5 STATUS_IO_TIMEOUT then maybe the request is
getting blocked somewhere in the WDF layer before making it down to USBPORT.SYS.
I believe there should be WDF debug logging that might help investigate this
issue but I don’t know the details of that myself. Maybe someone else can add
that information.
If you could repro the same behavior on Windows 7 there is USB ETW logging that
would at least show whether or not the URB was received by USBPORT.SYS and then
subsequently canceled.
-Glen