Re: Usb stack and STATUS_TIMEOUT by KeWaitForSingleObject - IRP hang

Tech-Archive recommends: Fix windows errors by optimizing your registry



Doron Holan [MS] wrote:
after you call IoCancelIrp, you MUST infinitely wait for the irp to come back. IoBuildDeviceIoControlRequest will create an irp that is tied to the calling thread, so the calling thread must exist when the irp completes. this would be the cause for your code to sometimes bugcheck after IoCancelIrp.

d


Sorry, I know about this. It's only for test purposes (I forgot to correct this befor I sent it), and as I wrote in previous mail - "As result of hang IRP ...". The Main problem is hanging (deadlocking) IRP in lower USB stack drivers.


Slavo Tomascik
.



Relevant Pages

  • Re: Usb stack and STATUS_TIMEOUT by KeWaitForSingleObject - IRP hang
    ... IoBuildDeviceIoControlRequest will create an irp that is tied to the ... calling thread, so the calling thread must exist when the irp completes. ... > I use synchronous request IoBuildDeviceIoControlRequest; ... > // Set up the URB ptr to pass to the USB driver stack ...
    (microsoft.public.development.device.drivers)
  • Re: Drivers Role in an Asynchronous Call to DeviceIOControl
    ... block the calling thread, but instead mark the IRP as pending and return ... from the DeviceIoControl routine with STATUS_PENDING. ... short fast operation you can complete the IRP immediately. ... If your driver is creating IRP's or is forwarding and IRP and needs to do ...
    (microsoft.public.development.device.drivers)
  • Re: Reusing Irps and URBs
    ... you can use reuse the PIRP and PURB if they are allocated properly. ... IoBuildDeviceIoControlRequest, use IoAllocateIrp and then format the next ... so just remove that complexity and use IoAllocateIrp. ... IRP down the stack. ...
    (microsoft.public.development.device.drivers)
  • Re: send commands to the keyboard controller
    ... IoBuildDeviceIoControlRequest assigns the IRP to the thread, ... StorageCraft Corporation ... >> i think you should send an asynchronous request ...
    (microsoft.public.development.device.drivers)
  • Re: send commands to the keyboard controller
    ... IoBuildDeviceIoControlRequest is a threaded IRP API, ... >> i think you should send an asynchronous request ...
    (microsoft.public.development.device.drivers)