Hi,
On my system, my vendor (IBM) preinstalls a filter driver (IBM Active
PCI a.k.a. ibmhpf.sys) that sits between the PCI bus and PCI device
drivers (such as mine). It manages some IBM-specific PCI hotplug
functionality and should be "transparent" to PCI device drivers. My
device driver is not aware of this filter and continues to work as
usual. However, after I reload my driver (Disable+Enable in the Device
Manager), it would no longer operate normally, getting null MDLs in its
DispatchRead routine. As you know, there can be two reasons for getting
null MDLs:
1. Not having DO_DIRECT_IO in your DEVICE_OBJECT's Flags. (Obviously I
always had this flag set.)
2. Passing a zero-sized buffer to ReadFile. (I don't do this.)
Inspecting my device with Walter Oney's DevView revealed the reason:
while my FDO has DO_DIRECT_IO in its flags, IBM's FiDO does not -- and
IBM's FiDO has relocated from being between my FDO and the PCI bus, to
be *on top* of my FDO!
What can cause this FiDO (whose source code I obviously don't have) to
be inserted at the right place on system startup, but at the wrong
place on subsequent reload of my driver?