USB NIC driver faild on calling "IoCallDriver"

Discussion in 'Windows Vista Drivers' started by Paul Simon, Aug 2, 2004.

  1. Paul Simon

    Paul Simon Guest

    We are Developing WDM NDIS miniport Driver for USB
    device. And we used the Chariot 5.0 "Throughput.scr" to test the
    performance. After a while, we encountered a problem that the driver
    every time failed on

    804f58a3 389e66010000 cmp [esi+0x166],bl

    We used WinDbg to debug this and the debuger said probably cause
    by our routine on calling "IoCallDriver(...)"

    Any pointers or help is highly appreciated!


    An attempt was made to access a pageable (or completely invalid) address at an
    interrupt request level (IRQL) that is too high. This is usually
    caused by drivers using improper addresses.
    If a kernel debugger is available get the stack backtrace.
    Arg1: 00000166, memory referenced
    Arg2: 00000002, IRQL
    Arg3: 00000000, value 0 = read operation, 1 = write operation
    Arg4: 804f58a3, address which referenced memory

    Debugging Details:

    READ_ADDRESS: 00000166


    804f58a3 389e66010000 cmp [esi+0x166],bl



    LAST_CONTROL_TRANSFER: from 804f59ce to 804f58a3

    TRAP_FRAME: f0a435c8 -- (.trap fffffffff0a435c8)
    ErrCode = 00000000
    eax=00000000 ebx=00000000 ecx=000000e8 edx=f0a43648 esi=00000000 edi=81b10f18
    eip=804f58a3 esp=f0a4363c ebp=f0a43654 iopl=0 nv up ei pl zr na po nc
    cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
    804f58a3 389e66010000 cmp [esi+0x166],bl
    Resetting default scope

    f0a43654 804f59ce 81b10f18 00000000 00000000 nt!KeInsertQueueApc+0x20
    f0a43688 80648736 81b10ed8 00000000 80dc49f0 nt!IopfCompleteRequest+0x1d7
    f0a436f0 f96d84cf f96dc150 81b10ed8 00000000 nt!IovCompleteRequest+0x90
    f0a436f4 f96dc150 81b10ed8 00000000 80e72200 usbhub!USBH_CompleteIrp+0x13
    f0a43710 f96d9a4a 06900a00 81b10ed8 f0a43754 usbhub!USBH_PdoDispatch+0x2e6
    f0a43720 804eda36 80e72200 81b10ed8 806ca1a8 usbhub!USBH_HubDispatch+0x46
    f0a43730 80648111 81b10fd0 81b10ff4 ffb620d8 nt!IopfCallDriver+0x31
    f0a43754 806504de ffb62020 80d85cb8 ffb05e00 nt!IovCallDriver+0x9e
    f0a43764 804eda36 ffb62020 81b10ed8 806ca1a8 nt!ViDriverDispatchGeneric+0x27
    f0a43774 80648111 00000103 ffaeaad8 ffb05eb8 nt!IopfCallDriver+0x31
    f0a43798 f11cb31c ffacd4a8 f0a437c0 f11cc6db nt!IovCallDriver+0x9e
    Paul Simon, Aug 2, 2004
    1. Advertisements

  2. is this an IRP that you allocated with IoAllocateIrp? My guess is yet b/c
    you don't get PIRPs in NDIS. If so, you must not allow the irp to complete.
    Instead, in your completion routine, you *MUST* return
    STATUS_MORE_PROCESSING_REQUIRED and then if you want to free the PIRP, call
    IoFreeIrp. If you let the irp complete all the way back to the i/o
    subsystem, it will try to notify the sending thread. Since the sending
    thread part of the PIRP is not setup by IoAllocateIrp, things go awry.


    Please do not send e-mail directly to this alias. this alias is for
    newsgroup purposes only.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Doron Holan [MS], Aug 2, 2004
    1. Advertisements

  3. An DON'T use IoBuild*****Request. Use plain IoAllocateIrp.

    Alexander Grigoriev, Aug 2, 2004
  4. Paul Simon

    Paul Simon Guest

    Thanks for your replied!
    Our driver has used "IoAllocateIrp" for allocated an IRP.
    And the driver get crashed after about half an hour while run the
    performance testing.
    It crashed on calling "IoCallDriver" of our USBBulkOutDataPacket(...)

    If anyone has any other suggestions or comments, please let me know.

    Paul Simon, Aug 3, 2004
  5. You need to show your function which creates the IRP and your completion
    I'd suspect your'e not freeing IRPs.

    Alexander Grigoriev, Aug 3, 2004
    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.