>
Hi,
I have a NDIS 5 Intermediate driver that was written based on the passthru
> driver sample in WDK 7. It has been working until windows 8.1. Even on
> 8.1, most functions works fine except power management.I understand that NDIS 5 is not officially supported on windows 8 but am
> hoping that things should still work. I found below comment from MS
> engineer on another forum:> ?*NDIS 5.x is deprecated starting with Windows Vista and Windows Server
> 2008. This means we will remove NDIS 5.x from a future version of Windows.
> In fact, the future is already here: Windows 8.1 removes support for
> wireless NDIS 5.x drivers, although Ethernet remains functional in Windows
> 8.1. We will also not allow an NDIS 5.x driver to get a logo for Windows 8.
> You should be able to get an NDIS 5.x driver to work on Windows 7, though.?
> *> I understand that we need to upgrade our driver ultimately.
> Unfortunately we are at the edge of release and such upgrade is not
> possible at this moment. I am just hopeful that since we are not a
> wireless NDIS driver, things should still work with some adjustment,
> perhaps? Allow me to describe the issue first, any suggestions is
> appreciated.> The problem:
On windows 8.1 when unit sleeps, I get this bugcheck:
*DRIVER_POWER_STATE_FAILURE (9f)*
*A driver is causing an inconsistent power state.*
*Arguments:*
*Arg1: 0000000000000003, A device object has been blocking an Irp for too
> long a time**Arg2: ffffe0000100a880, Physical Device Object of the stack*
*Arg3: ffffd00020931960, Functional Device Object of the stack*
*Arg4: ffffe00000e29600, The blocked IRP*
> This is because my driver gets stuck on the IRP_MN_SET_POWER IRP. Since
> Sleep works fine on windows 8, I compare the sleep work flow between
> windows 8 and 8.1 and found what may have caused the problem:Below is what happens (and work) on windows 8:
Unit enters sleep
IM?s miniport edge receives OID_PNP_SET_POWER to set to
> NdisDeviceStateD3, miniport completes the request successfullyIM?s protocol edge receives PnP event NetEventSetPower to set to
> NdiskDeviceStateD3, IM?s protocol completes the request successfullyNDIS calls IM?s UnbindAdapterHandler. UnbindAdapterHandler calls
> NdisIMDeInitializeDeviceInstance() to remove our device instance, which
> triggers Miniport?s HaltHandler. Once Miniport?s HaltHandler completes,
> IM?s UnbindAdapterHandler can complete the unbind request.> Below is what happens (and stuck) on windows 8.1:
Unit enters sleep
IM?s miniport edge receives OID_PNP_SET_POWER to set to
> NdisDeviceStateD3, miniport completes the request successfullyIM?s protocol edge receives PnP event NetEventSetPower to set to
> NdiskDeviceStateD3, IM?s protocol completes the request successfullyNDIS calls IM?s UnbindAdapterHandler. UnbindAdapterHandler calls
> NdisIMDeInitializeDeviceInstance() to remove our device instance. Here is
> the problem: NDIS does NOT call Miniport?s HaltHandler, causing
> NdisIMDeInitializeDeviceInstance() never returns, which in turn cause
> UnbindAdapterHandler never returns, and ultimately the
> DRIVER_POWER_STATE_FAILURE bug check.> After examining miniport states, I found that: On win8, after step 2,
> miniport remains on ?running? state; while on win8.1, after step 2,
> miniport is on ?paused?. Such state difference may be the reason
> Miniport?s HaltHandler was not called?> Kd dump of miniport details before step 4
> NdisIMDeInitializeDeviceInstance() call:On win8:
> *3: kd> !ndiskd.miniport fffffa8003c891a0*
*MINIPORT*
>
* Intel(R) Ethernet Connection I217-LM - OSM Network Stack Miniport*
>
*
> ** Ndis Handle fffffa8003c891a0*
* Ndis API Version v5.1*
* Adapter Context fffffa80040f1cf0*
* Miniport Driver fffffa8004a30c20 - osmns.sys v12.5*
* Ndis Verifier [No flags set]*
*
> ** Media Type 802.3*
* Physical Medium NdisPhysicalMediumUnspecified*
* Device Path
> ??\ROOT#VCI_BOOTNFMP#0000#{ad498944-762f-11d0-8dcb-00c04fc3358c}{01DE7911-3A8B-4558-9688-72EEAA78FF29}
> ** Device Object fffffa8003c89050*
* MAC Address 90-b1-1c-a5-52-f6*
*
> **
> **STATE*
* Miniport Running *
* Device PnP Started*
* Datapath 00000004 ? DIVERTED_BECAUSE_PM_STOPPED*
* NBL Status NDIS_STATUS_ADAPTER_NOT_READY*
* Operational status DORMANT*
* Operational flags 00000008 ? DORMANT_LOW_POWER*
* Admin status ADMIN_UP*
* Media Connected*
* Device Power D3*
* Driver Power D3*
* References 8*
* User Handles 0*
* Total Resets 0*
* Pending OID None*
* Flags 2405b800*
* ? NOT_BUS_MASTER, IGNORE_PACKET_QUEUE, IGNORE_REQUEST_QUEUE,*
* IGNORE_TOKEN_RING_ERRORS, INTERMEDIATE_DRIVER,
> DEFAULT_PORT_ACTIVATED,** DESERIALIZED, NOT_RESOURCES_AVAILABLE, SUPPORTS_MEDIA_SENSE,*
* DOES_LOOPBACK, MEDIA_CONNECTED*
* PnPFlags 28019821*
* ? PM_SUPPORTED, DEVICE_POWER_ENABLED, SYSTEM_SLEEPING, HIDDEN,*
* NO_HALT_ON_SUSPEND, RECEIVED_START, FILTER_IM,
> CANCELLED_WAKEUP_TIMER*…
> Same dump on win8.1:
**
*7: kd> !ndiskd.miniport ffffe0000026e1a0*
>
*MINIPORT*
>
* Intel(R) Ethernet Connection I217-LM #2 - OSM Network Stack Miniport**
> ** Ndis Handle ffffe0000026e1a0*
* Ndis API Version v5.1*
* Adapter Context ffffe0000287d7a0*
* Miniport Driver ffffe0000110d620 - osmns.sys v12.6*
* Ndis Verifier [No flags set]*
*
> ** Media Type 802.3*
* Physical Medium NdisPhysicalMediumUnspecified*
* Device Path
> ??\ROOT#VCI_BOOTNFMP#0001#{ad498944-762f-11d0-8dcb-00c04fc3358c}{8AEFC357-BF23-4D47-8F16-1E43C063AD71}
> ** Device Object ffffe0000026e050*
* MAC Address 90-b1-1c-a5-52-f6*
*
> **
> **STATE*
* Miniport PAUSED *
* Device PnP Started*
* Datapath 00000004 ? DIVERTED_BECAUSE_PM_STOPPED*
* NBL Status NDIS_STATUS_LOW_POWER_STATE*
* Operational status DORMANT*
* Operational flags 00000008 ? DORMANT_LOW_POWER*
* Admin status ADMIN_UP*
* Media Connected*
* Device Power D3*
* Driver Power D3*
* References 9*
* User Handles 0*
* Total Resets 0*
* Pending OID None*
* Flags 2405b800*
* ? NOT_BUS_MASTER, IGNORE_PACKET_QUEUE, IGNORE_REQUEST_QUEUE,*
* IGNORE_TOKEN_RING_ERRORS, INTERMEDIATE_DRIVER,
> DEFAULT_PORT_ACTIVATED,** DESERIALIZED, NOT_RESOURCES_AVAILABLE, SUPPORTS_MEDIA_SENSE,*
* DOES_LOOPBACK, MEDIA_CONNECTED*
* PnPFlags 28019821*
* ? PM_SUPPORTED, DEVICE_POWER_ENABLED, SYSTEM_SLEEPING, HIDDEN,*
* NO_HALT_ON_SUSPEND, RECEIVED_START, FILTER_IM,
> CANCELLED_WAKEUP_TIMER*…
> I also tested the passthru driver provided in WDK 7 and found the same
> issue when run on win8.1.Really appreciate your insight and suggestion to this issue, especially on
> below 2 questions:
Do you think this issue is caused by incompatibility between NDIS 5
> and win8.1? Or perhaps a bug in 8.1?Any possible work around besides upgrading to NDIS 6?
Thanks again.
ML