We have developed a Virtual Storport Miniport driver which talks to remote storage device using network adapter.
In essence our virtual storport miniport stack have a dependency on TCP/IP driver stack. We perform ndkopenadapter() to get hold of the network adapter
and then use winsock kernel APIs for communicating with the network adapter.
Now with this set up We are facing below issue with power management :
During Suspend/Hibernate/Shutdown, the network stack gets power notification before our vstorport miniport and consequently the network stack goes away first
and the link between our vstorport miniport and network adapter is broken.
So we do not get a chance in our vstorport miniport to do its terminal CDBs/SRBs as part of its sleep/hibernate/shutdown sequence.
As a consequence when the system comes back from hibernation or sleep, our vstorport miniport driver is not not able to establish a connection with the network stack again. NdkOpenadapter() fails.
On this forum people have suggested couple of ideas on this kind of similar problem.
One of th idea is to create a power-event based relationship between the Network Adapter and our vstorport miniport driver, so that we get notified whenever the network adapter gets hibernate request so that we can release the network resources.
Basically what should be done is to make vstorport miniport a pnp child of the pnp tree of the network stack.
But the concern here is that, we don’t want to tie ourself to a particular network device instance as mentioned by a forum member.
Consider a failover situation: we might have multiple network adapter card devices on the system, and an IP address can shift from one to the other. We would want to float with the IP address by binding to a socket, not to a network adapter.
Given the circumstances please advice what can be done to address the issue. Please help us out.