Again, lack of practical experience here is showing ;). Yes, you send the query to the top of the stack, but for 99% of the stacks out there, only the PDO answers the query interface. So while the FDO could aggregate the interface that the PDO provides into its own interface, this is barely ever, if never, done. Furthermore, there is the power issue related to IRQL and a direct function call. Even if the FDO did aggregate, GetBusData can be called at IRQL > passive and if the device is currently off, there is no way to synchronously power it up by the time the function returns.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Thursday, October 16, 2008 11:54 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reading from device dependent region in PCI Config space?
well, if you knew the architecture of how bus interface std worked, you would already know the answer.
I know it - don’t worry about that…
the bus driver (pci.sys) is the one that provides the callbacks via the PDO,
not the FDO who controls the resources. the interface is meant to be used by the FDO driver,
not someone outside of the stack.
Hold on - let’s decide what we are speaking about. I am not saying that one should query PDO itself - instead, you would normally forward the query to the top of the stack. Consider the scenario when there is a filter above FDO, and, for this or that reason, it wants to make use of these callbacks(I know that normally you would expect such filter to be below FDO, but technically there is no reason why upper filter may not want to do it). Therefore, if FDO makes use of a given interface it would be quite unwise for it to pass the results of the query right to the caller for the reasons that you have described in your earlier post - instead, it would rather make sense to encapsulate them in FDOs handlers that would take care of these issues, and forward the request to the bus driver . After all, FDOs and filters may optionally handle IRP_MN_QUERY_INTERFACE, although, unlike bus drivers they are not required to do so…
Therefore, I would say that if the issue that you have described arise, it is FDOs, rather than caller’s, fault…
Anton Bassov
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer