NDIS and PnP

I have a legacy NDIS 4 miniport driver, which relies on another driver for
some services. Both these drivers
use the same card for I/O (it’s a Fibre Channel card). Under Win2K, with a
hot-plug backplane, we try to
power down the slot our card is in. The second driver gets PnP IRPs
(IRP_MN_QUERY_REMOVE_DEVICE),
and returns STATUS_SUCCESS, but NDIS never shuts down my driver
(MiniportHalt
never gets called). Because the miniport holds a reference to the second
driver, nothing ever gets shut down.

If I shut down my net driver manually, and then try to power off the
hot-plug PCI slot, it works beautifully, as
MiniportHalt dereferences the second driver object.

The second driver is marked as a bus driver, and enumerates my net driver
during PnP initialization. The only
PnP info I can find for NDIS Miniports is for transitioning to powersave
modes and for Wake-On-Lan, nothing on
PnP shutdown.

I know I should be writing an NDIS-WDM driver (and that’s a future plan),
but this is legacy.

I’ve tried both setting and not setting NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND,
but it doesn’t seem to work. When
I get OID_PNP_CAPABILITIES in MiniportQueryInformation, I return
NDIS_STATUS_UNSUPPORTED.

How do I get NDIS to call my MiniportHalt when my PnP slot is being powered
down?

Sorry this is so incoherent.



Scott Neugroschl 805-370-2619
Troika Networks, Inc xxxxx@troikanetworks.com
www.troikanetworks.com



You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

One possible reason for this is that the second driver might be registered
as the service binary for your card (NDIS allows only one service binary for
each network card), and so when the card needs to be shutdown the halt
handler of the associated binary will be called, which in your case is the
second driver.
NDIS does not know that the first driver is also associated with the card
and hence it does not call the miniporthalt handler.
But it knows that the second driver depends upon the first driver and so
when you manually shutdown the driver it calls the shutdown routine.

By the way how are you registering/loading 2 binaries for one card???
How are they interrelated from the systems point of view?

RAmit.

----- Original Message -----
From: “Scott Neugroschl”
To: “NT Developers Interest List”
Sent: Saturday, June 09, 2001 12:23 AM
Subject: [ntdev] NDIS and PnP

>
> I have a legacy NDIS 4 miniport driver, which relies on another driver for
> some services. Both these drivers
> use the same card for I/O (it’s a Fibre Channel card). Under Win2K, with
a
> hot-plug backplane, we try to
> power down the slot our card is in. The second driver gets PnP IRPs
> (IRP_MN_QUERY_REMOVE_DEVICE),
> and returns STATUS_SUCCESS, but NDIS never shuts down my driver
> (MiniportHalt
> never gets called). Because the miniport holds a reference to the second
> driver, nothing ever gets shut down.
>
> If I shut down my net driver manually, and then try to power off the
> hot-plug PCI slot, it works beautifully, as
> MiniportHalt dereferences the second driver object.
>
> The second driver is marked as a bus driver, and enumerates my net driver
> during PnP initialization. The only
> PnP info I can find for NDIS Miniports is for transitioning to powersave
> modes and for Wake-On-Lan, nothing on
> PnP shutdown.
>
> I know I should be writing an NDIS-WDM driver (and that’s a future plan),
> but this is legacy.
>
> I’ve tried both setting and not setting NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND,
> but it doesn’t seem to work. When
> I get OID_PNP_CAPABILITIES in MiniportQueryInformation, I return
> NDIS_STATUS_UNSUPPORTED.
>
> How do I get NDIS to call my MiniportHalt when my PnP slot is being
powered
> down?
>
> Sorry this is so incoherent.
>
> --------------------------------------------------------------------------

> -----------------------------------
> Scott Neugroschl 805-370-2619
> Troika Networks, Inc xxxxx@troikanetworks.com
> www.troikanetworks.com
> --------------------------------------------------------------------------

> -----------------------------------
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@wipro.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com