Ndis Wdm miniport, Halt not called at device removal

Discussion in 'Windows Vista Drivers' started by Francois Champs, Feb 20, 2006.

  1. Dear All,
    My Ndis miniport is also a WDM that relies on a lower PCI driver. It sends
    and receives Irps for Rx and Tx and there is therefore a Rx Irp queue in the
    lower driver.
    My problem is the following: sometimes (more often when there is traffic on
    the port), the MiniportHalt is never called. So my question is: does the
    upper layers (Pnp manager) wait for all the pending requests (Tx and Rx) to
    be completed before requesting the miniport to halt? The underlying problem
    is that when I receive a "query remove" in the lower driver, I complete the
    Rx queue back to the WDM Ndis driver and in this case, I don't know what to
    do in its Rx completion routine. Should I "indicate complete" the
    corresponding packet with a 0 buffer size, or with a special status? How can
    I tell the upper layers not to send back the packet? Should I
    NdisMIndicateStatus( NDIS_STATUS_CLOSING) somewhere before?
    Any help about the way I should handle the whole stack removal (NDIS WDM +
    lower PCI driver and their queues) is greatly appreciated!
    Many thanks in advance and have a nice day all!
    Francois Champs, Feb 20, 2006
    1. Advertisements

  2. Francois Champs

    Pavel A. Guest

    Is your ndis driver root enumerated or a filter over the PCI driver?

    Pavel A., Feb 20, 2006
    1. Advertisements

  3. Hy Pavel,
    Thank you for you answer.
    My NDIS-WDM driver is a FDO on a PDO that I create in my lower PCI (bus
    like) driver. Now I guess the good solution would be to remove the stack from
    the top to the bottom. Can you confirm the following:
    - I tell the bus driver to unload in the device manager
    - I only say "Yes" in the query remove fo the PDO
    - This should lead to a Halt in the NDIS-WDM FDO (is this true...????)
    because the Pnp manager knows this stack is beeing removed and therefore does
    not send packets anymore (...???)
    Many thanks in advance,
    Francois Champs, Feb 20, 2006
  4. the port), the MiniportHalt is never called. So my question is: does the
    Maxim S. Shatskih, Feb 20, 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.