driver crash in completion routine.

Discussion in 'Windows Vista Drivers' started by tsindia, Feb 21, 2006.

  1. tsindia

    tsindia Guest


    My USB device for some reason stops responding, and the IRP pending with
    the USBD is not returned with any error code. i.e. it keeps pending with the
    Doesn't teh host controller driver or USBD fail teh IRP with some USBD
    code or it just keeps trying to get data from the device.
    In that case I guess i would need to cancel the IRP before detaching my
    device, cause isin't it possible that when i connect my device again , the
    pending IRP is completed and it tries to invoke my iocompletionroutine which
    may be non-existent.

    These are just my thoughts on this. I am not sure what teh real thing is?
    What i do see is that my device stops and then my driver too doesn't get any
    info from the underflying stack.
    What is teh behaviour of USBD and host controller driver under these

    I have implmented a queue in my function driver and so i am sure that
    only one IRP is pended at any time with USBD.
    What do I need to do to make sure that the next time i connect my device, i
    donot get a crash. I have an independent thread which creates and queues all
    my IRPs , I don't queue
    anything from the dispatch routine. The thread just waits in the dispatch
    routine until the thread is signalled.

    tsindia, Feb 21, 2006
    1. Advertisements

  2. tsindia

    fat_boy Guest

    When your driver unloads it must cancel the read Irp it sent to the USB
    fat_boy, Feb 21, 2006
    1. Advertisements

  3. tsindia

    Tim Roberts Guest

    For a bulk pipe, the host controller will keep retrying forever. For an
    isochronous pipe, each packet gets one shot, and then the IRP is returned
    to you.
    Tim Roberts, Feb 23, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.