I’ve forwarded this onto our core usb team. I’ll see what I can dig up.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, January 11, 2007 11:26 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Long URB cancellation at Vista
It looks like this. Problem occurs only if interrupt endpoint value was
really read previously i.e. URB submit followed by cancel doesn’t
exhibit problem. Also, USB communication at control endpoint causes
immediate completion routine call. So it seems OS USB drivers have to
touch HC to complete cancellation. Surprisingly, checking port status
isn’t enough.
It seems the problem is related to OHCI HCs. Previously I though I have
a computer with OHCI which doesn’t exhibit problem but it was a mistake
– it does. At the same computer an UHCI HC is installed and there is no
problem. Looks as an OHCI drivers bug (again, XP don’t have a problem).
Call stack is always the same at both OHCI and UHCI:
fffff80002861950 fffff800
01848829 : 0000000000000000 fffffa80
01b8e570 fffffa800415f620 00000000
70627375 :
tcusb!IntEpPollingCompletion+0xb02
[d:\p4root\tcdrv\main\src\tcdrv\intep.c @ 217]
fffff80002861ab0 fffff980
030e358f : fffffa8002f3b050 fffffa80
02f3b002 fffffa80021fe4b0 fffffa80
02208c30 :
nt!IopfCompleteRequest+0x1a9
fffff80002861b20 fffff980
030e3c48 : 0000000054546b63 fffffa80
01b8e570 fffffa8002f3b1a0 fffffa80
c0000120 :
USBPORT!USBPORT_Core_iCompleteDoneTransfer+0x8d3
fffff80002861c00 fffff980
030e10ea : fffffa8033585043 fffffa80
02f3b1a0 fffffa8002f3c080 fffffa80
02f3b1a0 :
USBPORT!USBPORT_Core_iIrpCsqCompleteDoneTransfer+0x514
fffff80002861c70 fffff980
030cdfeb : fffffa8031636f49 fffffa80
02f3c080 fffffa8002f3c002 fffffa80
02f3b1a0 :
USBPORT!USBPORT_Core_UsbIocDpc_Worker+0x13a
fffff80002861cc0 fffff800
018422b5 : 0000004e41345558 fffffa80
34776478 fffffa8002f3c080 fffff800
01942a80 :
USBPORT!USBPORT_Xdpc_Worker+0x26f
fffff80002861d10 fffff800
0184206f : fffff980030cdd7c fffff800
01942a80 0000000000000001 fffff800
01947d80 :
nt!KiRetireDpcList+0x145
fffff80002861d80 fffff800
019f7704 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 :
nt!KiIdleLoop+0x5f
fffff80002861db0 00000000
fffff800 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 :
nt!KiSystemStartup+0x1d4
Any idea how to “kick” OHCI driver the least intrusive way? Ideally
without even control endpoint communication.
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Randy Aull[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, January 11, 2007 11:53 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Long URB cancellation at Vista
I’m not sure about on Vista, but I have run into issues with some
chipsets on XP. In these cases, the controller didn’t notify the
driver
that it was ok to remove the transfer from the schedule (no
interrupt).
Periodically the driver would check the state of the hardware just in
case. During this check, the driver would notice that the transfer
was
ready to remove, and the cancellation would proceed.
During Winusb development, I had a cancellation unit test case.
Usually
this test case would complete in less than 10ms, but occasionally it
would spike to a very large time (like you see below).
There was some work to improve this worst case time, though I’m not
sure
what happened with that work.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, January 11, 2007 2:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Long URB cancellation at Vista
I know. It looks as cancellation is postponed to some worker thread
which is awakened once per 500 ms (upper bound is 516 ms). Or depends
on
something like this. Any idea how to find root cause of the problem?>
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Peter Wieland[SMTP:xxxxx@windows.microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, January 11, 2007 10:42 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Long URB cancellation at Vista
>
> Oh if only request cancellation were a compute bound problem. Then
all
> those CPU cycles would be useful.
>
> -p
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> Sent: Thursday, January 11, 2007 1:33 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Long URB cancellation at Vista
>
> > ----------
> > From:
>
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> ] on behalf of Tim Roberts[SMTP:xxxxx@probo.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, January 11, 2007 6:43 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re: [ntdev] Long URB cancellation at Vista
> >
> > xxxxx@Microsoft.com wrote:
> > > IoCancelIrp has no timing guarantees and 400 ms is not that
long.
> >
> > Not that long? A modern CPU will have executed almost a billion
> > instructions in that amount of time!
> >
> Exactly. In addition, these computers have nothing else to do during
> test and CPU utilization is near to zero.
>
> > I understand there are no timing guarantees, but that number seems
> about
> > three orders of magnitude too large to me.
> >
> For me, too. Normally I can measure 0 or 15 ms.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer