Hi guys,
I need a little bit of help here…I have a bus driver which creates a static child PDO, for which I install my miniport driver to (which has an NDIS upper edge). The two drivers talk to each other using a WDF Query Interface. It all works fine, except when I go to update the mp driver. Evidently, there’s a ref left around somewhere that I can’t pinpoint, and the mp driver doesn’t get unloaded. So, I see error code 38 in the device status window.
So, I have ensured that the ref count of my adapter object goes to zero in MPHalt(). MPHalt() is getting called, followed by MPUnload().
Both drivers are installed on the same stack, so with respect to registering the Query Interface functionality, I let the framework handle reference counting in this regard.
// Let the framework handle reference counting, since
// the TS_II_NDIS driver will be in the same stack:
tsiiBusNdisInterface.InterfaceHeader.InterfaceReference = WdfDeviceInterfaceReferenceNoOp;
tsiiBusNdisInterface.InterfaceHeader.InterfaceDereference = WdfDeviceInterfaceDereferenceNoOp;
I have seen refs to using WdfPdoMarkMissing(), but I don’t think I need to do this, since I want the PDO created by the bus driver to remain around, so that I can install the new driver to it.
Just so I’m clear, I should be able to update the mp driver without having to destroy/recreate another PDO down in the bus driver, right?
Can anyone suggest other instances that I might be missing, or provide some useful debugging tips using WinDbg for tracking this down? Any help would be greatly appreciated!
Thanks!
Jason