I have a simple driver for our USB device, based on the OSR USB sample
in the DDK.
The driver has been in use for over 8 years on thousands of instruments.
Recently, and only on one of our applications, we are getting system
lockups in the USB communication chain, apparently related to
CancelIo calls.
Of course, it doesn’t happen frequently or in any easily repeatable way…
My first idea was to port the driver from WDM platform to the KMDF platform.
Under KMDF 1.7, when the driver hangs the only recourse is to turn off the PC.
If I try to shut down the application using the driver it never closes.
Under the WDM model, and under KMDF 1.9, if I unplug the device and then
plug it back in the PC recovers from the error.
I grabbed a memory dump from when the I/O was hung, and after opening it
in windbg, it appears to be hung in \Driver\UsbEhci.
Irp is active with 5 stacks 2 is current (= 0x8c59af6c)
Mdl=89907f58: System buffer=898e00a0: Thread 89b506a0: Irp stack trace.
cmd flg cl Device File Completion-Context
[0, 0] 0 10 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[f, 0] 0 e1 89931030 00000000 8066510e-8c59af90 Success Error Cancel pending
\Driver\usbehci nt!IovpInternalCompletionTrap
Args: 893426dc 00000000 00220003 00000000
[f, 0] 0 e0 89c06c38 00000000 804f0800-89b334d0 Success Error Cancel
\DRIVER\VERIFIER nt!IopUnloadSafeCompletion
Args: 893426dc 00000000 00220003 00000000
[e, 0] 5 e1 898fe020 89928a38 8066510e-8c59afd8 Success Error Cancel pending
\Driver\MyDriver nt!IovpInternalCompletionTrap
Args: 00020400 00000004 00222001 00000000
[e, 0] 5 0 89bf6020 89928a38 00000000-00000000
\DRIVER\VERIFIER
Args: 00020400 00000004 00222001 00000000
Any ideas?
Thanks,
Peter Steinberg