> ------------------------------------------------------------------------
Don Burn:
Basically you have to do a WDM driver for a bus filter. One of the
challenges of a bus filter is you won’t see the AddDevice for the children
of the bus, but these can for PCI example include a bridge which means
another PCI bus. So unless you create your own state machine and have the
“real AddDevice” and the “internal AddDevice” you are not going get
everything you need. Bottom line I had done a bunch of WDM filter drivers
before I ever tried the bus filter, and it felt like I was doing almost
everything for the first time.
Don, I currently have the source code for a previous [working, WDM] PCI bus filter driver made by a software engineer at the company I work for, however only the source code was preserved and I have no idea of how to actually insert the driver into registry. Only the source files, themselves, were preserved with no remnants of any instructions on how to actually insert the driver into the system or any such INF. It would be nice to get this working again, however I just have no idea how to insert a WDM filter driver into the registry, and your previous recommendation sounds like it’s for KMDF upper/lower filter drivers and would end up throwing the driver into a different part of the driver stack than what this was meant to function under.
Also, yes – the source code for this driver is very extensive and looks like it was a lot of work. Glad I have something to work off of rather than having to design this from scratch.
Here is a link to a [somewhat relevant] post made by the software engineer who previously wrote this driver:
http://www.osronline.com/showThread.cfm?link=83377
I have played around with different methods of doing what you’ve said previously (by attaching to the PCI bus and filtering for “ACPI\PNP0A0(8/3)”. Would registering my driver to attach to “*PNP0A08” and “*PNP0A03” devices in my INF file have the same affect? I guess the only difference would be that you could filter out different devices on the fly with your method if you didn’t want to specifically attach to only PCI devices? Either way, this method seems as though it’s still attaching above/below the device driver and not a part of the bus driver, itself.
Mark Roddy:
Back to the OP’s issue - he can’t mask or defer or ‘soften’ the unplug,
that is not going to happen on a bus that gives independent components
access to the bus address space, so there really is no point in a bus
filter driver.
I agree this should be something handled within the driver of the device, itself, however we have no control over what hardware people put into our PCI-Express expansion systems so a “device-independent solution” was discussed and words like a “bus filter driver” were being thrown around to possibly handle unplug events for all devices behind our PCI-Express switches. Sounded like my best shot so I continued doing research in the area but it sounds like this path won’t come to frution if all the previous posts are true.
So to confirm with the NTDEV community, it would seem that the ONLY way to gracefully handle surprise removals is in the driver of the device, itself, and no amount of bus filter drivers can help alleviate [or help gracefully handle] this problem?
Also, any resources related to inserting *WDM* pci bus filter drivers would be much appreciated, I still can’t seem to find anything online but my search continues…
-Thomas Gray