- retrieve driver object of a device handled by other driver
- Posted by kobi n on March 4th, 2008
Hi.
Is there a way to get a DEVIE_OBJECT pointer of a device which is handled by
a driver that is not mine ?
my driver (WDF based) handles few devices that exist on one PCI card. The
pci-2-pci bridge device on that board(card) is handled by the pci.sys driver.
so my question is - can i get a handle to that bridge's DEVICE_OBJECT ?
the reason for i want this can be for reading PCI location info of the bridge
for example.
thanks,
Kobi.
- Posted by Doron Holan [MSFT] on March 4th, 2008
if the bridge is one level up in the pnp hierarchy the answer is no, there
is no way for you to get this parent devobj
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"kobi n" <kobin@discussions.microsoft.com> wrote in message
news:A30A7EBB-4569-48E8-A4B7-FC38E45F87EF@microsoft.com...
- Posted by kobi n on March 5th, 2008
Hi,
thanks a lot for the answer.
i want to be sure - when you say "one level up in the pnp hierarchy" you
refer to the level(number) of the the bus which the bridge is attached to ?
( just want to be sure that i'm alligned with the terminology or maybe i'm
missing something here)
thanks again,
Kobi
"Doron Holan [MSFT]" wrote:
- Posted by kobi n on March 5th, 2008
Hi again.
i would like to extend my question :
as described, i have a board which contains several pci devices. some of
them (a DSP for example) are handled by my driver. the pci-to-pci bridge
however is handled by the pci.sys.
now, i would like to perform a read(even write) to the bridge. in the past
we could ude the HalSet/GetBusData routines. today these are obsolete and
the alternative is using one of the two :
1. IRP_MN_READ/WRITE_CONFIG
2. IRP_MN_QUERY_INTERFACE
now i get to my problem. with both cases i need to supply a DEVIE_OBJECT
for the irp creation. i do not understand if this DEVICE_OBJECT should be,
in my case, the BRIDGE's devie object. since i cannot get this device object
as described in your previous answer, does it mean that i actually can't
perform read/write to the pci bridge ?
if i use IRP_MN_QUERY_INTERFACE, does the DEVICE_OBJECT i supply for the IRP
creation must be the bridge's one or maybe i'm missing something here and
should supply a DEVIE_OBJECT of my DSP for example and then get some kind of
interface to the pci driver and from there somehow get to the pci bridge ?
is using IRP_MN_QUERY_INTERFACE give me an interface to a specified device
(the bridge) or to the pci driver ?
thanks a lot,
Kobi.
"kobi n" wrote: