I tried the Query Interface approach. Following is the result:
Device stack from device tree utility looks like this:
FDO - \Driver\PCI
PDO - \Device\NTPNP_PCI0009
[PCI\VEN_xxxx&DEV_xxxx&SUBSYS_xxxxxxxx&REV_xx] <------ AHCI Controller
Device ID
FDO - \Device\00000048
FDO - \Device\Ide\iaStor0
In my driver I’m sending calling IoGetDevicePointer with
“NTPNP_PCI0009” as device name and sending IRP_MN_QUERY_INTERFACE to
the device pointer received. Following is the IRP tracker log:
Call 0x8891DE70-64 (UNKNOWN) \Device\Ide\iaStor0 PNP QUERY_INTERFACE
Call 0x8891DE70-64 \Device\Ide\iaStor0 \Device\00000049 PNP QUERY_INTERFACE
Call 0x8891DE70-64 \Device\00000049 \Device\NTPNP_PCI0009 PNP QUERY_INTERFACE
Comp 0x8891DE70-64 \Device\NTPNP_PCI0009 PNP QUERY_INTERFACE NOT_SUPPORTED,
Info = 0x0
From my understanding, for the AHCI Controller devnode, the PDO
“\Device\NTPNP_PCI0009” has been created by pci.sys (standard pci
driver) during enumeration and FDO “\Device\Ide\iaStor0” has been
created by the iaStor.sys (Intel storport driver). My IRP goes to this
devnode and is completed by PDO created by pci.sys with
STATUS_NOT_SUPPORTED. But when I install an upper filter driver in PCI
devnode and send the same IRP to this filter driver, I observe the
following:
Device stack from device tree utility looks like this:
FDO - \Driver\PCI
FDO - \Device\MyPciFilter
IRP tracker log looks like this:
Call 0x88867A38-712 (UNKNOWN) \Device\PhyMemPCIFilter PNP QUERY_INTERFACE
Call 0x88867A38-712 \Device\PhyMemPCIFilter (0x8B0F8A90)
PCI PNP QUERY_INTERFACE
Call 0x88867A38-712 (0x8B0F8A90)
PCI \Device\0000003d PNP QUERY_INTERFACE
Comp 0x88867A38-712 \Device\0000003d PNP QUERY_INTERFACE SUCCESS,
Info = 0x0
CompRoutine 0x88867A38-712 (0x8B0F8A90)
PCI PNP QUERY_INTERFACE MORE_PROCESSING_REQUIRED
Comp 0x88867A38-712 (0x8B0F8A90)
PCI PNP QUERY_INTERFACE SUCCESS, Info = 0x0
So, the same driver behaves one way when the request reaches a PDO
created by it and differently when the same request reaches the FDO
created by it? Is it because the PDO and the FDO belong to different
devnode?
@Doron
Given the above configuration, will the approach suggested by you
(QUERY_DEVICE_RELATIONS) work???
Anirudha
On Mon, Aug 13, 2012 at 11:44 PM, Doron Holan wrote:
>
> You can’t fail QDR/TargetDeviceRelations, otherwise you couldn’t open a handle IIRC
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A
> Sent: Monday, August 13, 2012 10:27 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Installing PCI filter driver without reboot.
>
> The driver will probably fail QDR, exactly like it failed QI…
> --pa
>
> On 13-Aug-2012 18:40, Doron Holan wrote:
> > Once you open the stack, send a query device relations / target device
> > relation to get the pdo. Once you have the pdo, send the query
> > interface directly to it, bypassing the fdo. You should only do this
> > if the fdo does not fwd query interfaces down the stack (which is a
> > wdm rule/driver verifier rule violation)
> >
> > d
> >
> > debt from my phone
>
>
> —
> 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
>
>
>
> —
> 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