Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Why the disk driver (disk.sys) can not receive a PDO(physical device object) that is created by a class(disk) low filter driver?

Reply
Thread Tools Display Modes

Why the disk driver (disk.sys) can not receive a PDO(physical device object) that is created by a class(disk) low filter driver?

 
 
Peter
Guest
Posts: n/a

 
      11-03-2009
Hi,

I refer the following sources in the DDK to develop a disk low filter
driver:
\src\general\toaster\bus
\src\storage\class\disk

I would like to create a PDO in my disk low filter driver, and hope the
disk
driver can see the PDO, but the result is the PDO does not appear in disk
driver.

The following are the main procedure in my disk low filter driver:

call IoCreateDevice(), IoInvalidateDeviceRelations(), then
receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
IRP_MJ_PNP.IRP_MN_START_DEVICE

Any comment for my problem, thanks.

Best Regards,
Peter,


 
Reply With Quote
 
 
 
 
Don Burn
Guest
Posts: n/a

 
      11-03-2009
How did you tell the Plug and Play system that the PDO is there and part of
the disk stack. If this is not a PDO filtering an existing PDO you need to
to act like a bus filter and handle IRP_MJ_PNP calls in particular
IRP_MN_QUERY_DEVICE_RELATIONS


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Peter" <> wrote in message
news:eTqy%23%...
> Hi,
>
> I refer the following sources in the DDK to develop a disk low filter
> driver:
> \src\general\toaster\bus
> \src\storage\class\disk
>
> I would like to create a PDO in my disk low filter driver, and hope the
> disk
> driver can see the PDO, but the result is the PDO does not appear in disk
> driver.
>
> The following are the main procedure in my disk low filter driver:
>
> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
> IRP_MJ_PNP.IRP_MN_START_DEVICE
>
> Any comment for my problem, thanks.
>
> Best Regards,
> Peter,
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4568 (20091103) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4568 (20091103) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




 
Reply With Quote
 
Peter
Guest
Posts: n/a

 
      11-04-2009
Hi,
I call function IoCreateDevice() to create a DO(device object) and call
function
IoInvalidateDeviceRelations() to notify the Plug and Play system. In DDK
source
\src\general\toaster\bus, the bus-enum driver do like these to create a PDO.
And then
I receive the IRP, "IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelat ions",
after I handle the IRP, I receive the IRP "IRP_MJ_PNP.IRP_MN_START_DEVICE".

I want to create a PDO, if bus filter driver handles IRP_MJ_PNP calls
in particular
IRP_MN_QUERY_DEVICE_RELATIONS can create a new PDO?

Best Regards,
Peter,



"Don Burn" <> ¦b¶l¥ó
news:% ¤¤¼¶¼g...
> How did you tell the Plug and Play system that the PDO is there and part

of
> the disk stack. If this is not a PDO filtering an existing PDO you need

to
> to act like a bus filter and handle IRP_MJ_PNP calls in particular
> IRP_MN_QUERY_DEVICE_RELATIONS
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Peter" <> wrote in message
> news:eTqy%23%...
> > Hi,
> >
> > I refer the following sources in the DDK to develop a disk low filter
> > driver:
> > \src\general\toaster\bus
> > \src\storage\class\disk
> >
> > I would like to create a PDO in my disk low filter driver, and hope

the
> > disk
> > driver can see the PDO, but the result is the PDO does not appear in

disk
> > driver.
> >
> > The following are the main procedure in my disk low filter driver:
> >
> > call IoCreateDevice(), IoInvalidateDeviceRelations(),

then
> > receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
> > IRP_MJ_PNP.IRP_MN_START_DEVICE
> >
> > Any comment for my problem, thanks.
> >
> > Best Regards,
> > Peter,
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4568 (20091103) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >

>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus

signature database 4568 (20091103) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>



 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      11-04-2009
> I want to create a PDO, if bus filter driver handles IRP_MJ_PNP calls
> in particular
> IRP_MN_QUERY_DEVICE_RELATIONS can create a new PDO?


Yes it can.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Peter
Guest
Posts: n/a

 
      11-09-2009
Hi,
Is it impossible to create a PDO at disk class lower filter? I need a
guide
to create a PDO in my disk lower filter driver.

In my experiences, a PDO is created by a bus driver, if handling
IRP_MJ_PNP "
IRP_MN_QUERY_DEVICE_RELATIONS" in the bus filter driver, it seems only
can monitor or modify the content of the PDO. How the bus filter driver
creates
another PDO?

Best Regards,
Peter,

"Don Burn" <> ¦b¶l¥ó
news:% ¤¤¼¶¼g...
> How did you tell the Plug and Play system that the PDO is there and part

of
> the disk stack. If this is not a PDO filtering an existing PDO you need

to
> to act like a bus filter and handle IRP_MJ_PNP calls in particular
> IRP_MN_QUERY_DEVICE_RELATIONS
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Peter" <> wrote in message
> news:eTqy%23%...
> > Hi,
> >
> > I refer the following sources in the DDK to develop a disk low filter
> > driver:
> > \src\general\toaster\bus
> > \src\storage\class\disk
> >
> > I would like to create a PDO in my disk low filter driver, and hope

the
> > disk
> > driver can see the PDO, but the result is the PDO does not appear in

disk
> > driver.
> >
> > The following are the main procedure in my disk low filter driver:
> >
> > call IoCreateDevice(), IoInvalidateDeviceRelations(),

then
> > receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
> > IRP_MJ_PNP.IRP_MN_START_DEVICE
> >
> > Any comment for my problem, thanks.
> >
> > Best Regards,
> > Peter,
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4568 (20091103) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >

>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus

signature database 4568 (20091103) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>



 
Reply With Quote
 
Don Burn
Guest
Posts: n/a

 
      11-09-2009
You create a PDO and allocates space for a new list of PDO's then copies the
list comming up from the adapter driver to add the one it wants. If free
the old list that the lower driver allocated. It then has to be careful
for all PNP calls that go to that PDO to act as a bus driver but for all
others act as a filter.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Peter" <> wrote in message
news:...
> Hi,
> Is it impossible to create a PDO at disk class lower filter? I need a
> guide
> to create a PDO in my disk lower filter driver.
>
> In my experiences, a PDO is created by a bus driver, if handling
> IRP_MJ_PNP "
> IRP_MN_QUERY_DEVICE_RELATIONS" in the bus filter driver, it seems only
> can monitor or modify the content of the PDO. How the bus filter driver
> creates
> another PDO?
>
> Best Regards,
> Peter,
>
> "Don Burn" <> ¦b¶l¥ó
> news:% ¤¤¼¶¼g...
>> How did you tell the Plug and Play system that the PDO is there and part

> of
>> the disk stack. If this is not a PDO filtering an existing PDO you need

> to
>> to act like a bus filter and handle IRP_MJ_PNP calls in particular
>> IRP_MN_QUERY_DEVICE_RELATIONS
>>
>>
>> --
>> Don Burn (MVP, Windows DKD)
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>>
>> "Peter" <> wrote in message
>> news:eTqy%23%...
>> > Hi,
>> >
>> > I refer the following sources in the DDK to develop a disk low
>> > filter
>> > driver:
>> > \src\general\toaster\bus
>> > \src\storage\class\disk
>> >
>> > I would like to create a PDO in my disk low filter driver, and hope

> the
>> > disk
>> > driver can see the PDO, but the result is the PDO does not appear in

> disk
>> > driver.
>> >
>> > The following are the main procedure in my disk low filter driver:
>> >
>> > call IoCreateDevice(), IoInvalidateDeviceRelations(),

> then
>> > receive
>> > IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
>> > IRP_MJ_PNP.IRP_MN_START_DEVICE
>> >
>> > Any comment for my problem, thanks.
>> >
>> > Best Regards,
>> > Peter,
>> >
>> >
>> >
>> > __________ Information from ESET NOD32 Antivirus, version of virus
>> > signature database 4568 (20091103) __________
>> >
>> > The message was checked by ESET NOD32 Antivirus.
>> >
>> > http://www.eset.com
>> >
>> >
>> >

>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus

> signature database 4568 (20091103) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>>

>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4587 (20091109) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4587 (20091109) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




 
Reply With Quote
 
Peter
Guest
Posts: n/a

 
      11-11-2009
Hi,

As your comments, I trace all communications between disk.sys and Port
driver, the PDO I created in my disk lower filter driver is not passed to
function
"AddDevice" of disk.sys .
Trying to emulate Port driver work in my disk lower filter driver is not
easy
or impossible ?. How I can accomplish the work?
What is the Virtual Storport miniport driver?

Best Regards,
Peter,

eagersh" <> ???
news:03a4d15d-3376-40fd-ac99-
???...
On Nov 3, 3:23 am, "Peter" <peter_...@vasstek.com.tw> wrote:
> Hi,
>
> I refer the following sources in the DDK to develop a disk low filter
> driver:
> \src\general\toaster\bus
> \src\storage\class\disk
>
> I would like to create a PDO in my disk low filter driver, and hope the
> disk
> driver can see the PDO, but the result is the PDO does not appear in disk
> driver.
>
> The following are the main procedure in my disk low filter driver:
>
> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
> IRP_MJ_PNP.IRP_MN_START_DEVICE
>
> Any comment for my problem, thanks.
>
> Best Regards,
> Peter,

Why do you know that AddDevice of disk.sys is not called?
You are trying emulate Port driver work, aren't you. It is not easy.
If your target is Vista SP1 and up you should better use a Virtual
Storport miniport driver.
If you may also trace all communications between disk.sys to Port
Driver to check if you doing everything correctly. You could do it
because you have a lower filter class driver.
Another option is to write your own disk class driver. In this case
you need a bus driver also.

Igor Sharovar


 
Reply With Quote
 
Don Burn
Guest
Posts: n/a

 
      11-11-2009
It is not impossible, but does require careful work to handle all the PNP
calls.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Peter" <> wrote in message
news:%...
> Hi,
>
> As your comments, I trace all communications between disk.sys and Port
> driver, the PDO I created in my disk lower filter driver is not passed to
> function
> "AddDevice" of disk.sys .
> Trying to emulate Port driver work in my disk lower filter driver is
> not
> easy
> or impossible ?. How I can accomplish the work?
> What is the Virtual Storport miniport driver?
>
> Best Regards,
> Peter,
>
> eagersh" <> ???
> news:03a4d15d-3376-40fd-ac99-
> ???...
> On Nov 3, 3:23 am, "Peter" <peter_...@vasstek.com.tw> wrote:
>> Hi,
>>
>> I refer the following sources in the DDK to develop a disk low filter
>> driver:
>> \src\general\toaster\bus
>> \src\storage\class\disk
>>
>> I would like to create a PDO in my disk low filter driver, and hope the
>> disk
>> driver can see the PDO, but the result is the PDO does not appear in disk
>> driver.
>>
>> The following are the main procedure in my disk low filter driver:
>>
>> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
>> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
>> IRP_MJ_PNP.IRP_MN_START_DEVICE
>>
>> Any comment for my problem, thanks.
>>
>> Best Regards,
>> Peter,

> Why do you know that AddDevice of disk.sys is not called?
> You are trying emulate Port driver work, aren't you. It is not easy.
> If your target is Vista SP1 and up you should better use a Virtual
> Storport miniport driver.
> If you may also trace all communications between disk.sys to Port
> Driver to check if you doing everything correctly. You could do it
> because you have a lower filter class driver.
> Another option is to write your own disk class driver. In this case
> you need a bus driver also.
>
> Igor Sharovar
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4595 (20091111) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4597 (20091111) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




 
Reply With Quote
 
David Craig
Guest
Posts: n/a

 
      11-12-2009
If you use a bus driver to handle the real hardware and use KMDF then most
of your PnP and Power issues are resolved. You don't need to handle them in
StorPort as the port driver will just load and unload you when it wants.

"Don Burn" <> wrote in message
news:...
> It is not impossible, but does require careful work to handle all the PNP
> calls.
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Peter" <> wrote in message
> news:%...
>> Hi,
>>
>> As your comments, I trace all communications between disk.sys and Port
>> driver, the PDO I created in my disk lower filter driver is not passed to
>> function
>> "AddDevice" of disk.sys .
>> Trying to emulate Port driver work in my disk lower filter driver is
>> not
>> easy
>> or impossible ?. How I can accomplish the work?
>> What is the Virtual Storport miniport driver?
>>
>> Best Regards,
>> Peter,
>>
>> eagersh" <> ???
>> news:03a4d15d-3376-40fd-ac99-
>> ???...
>> On Nov 3, 3:23 am, "Peter" <peter_...@vasstek.com.tw> wrote:
>>> Hi,
>>>
>>> I refer the following sources in the DDK to develop a disk low filter
>>> driver:
>>> \src\general\toaster\bus
>>> \src\storage\class\disk
>>>
>>> I would like to create a PDO in my disk low filter driver, and hope the
>>> disk
>>> driver can see the PDO, but the result is the PDO does not appear in
>>> disk
>>> driver.
>>>
>>> The following are the main procedure in my disk low filter driver:
>>>
>>> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
>>> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
>>> IRP_MJ_PNP.IRP_MN_START_DEVICE
>>>
>>> Any comment for my problem, thanks.
>>>
>>> Best Regards,
>>> Peter,

>> Why do you know that AddDevice of disk.sys is not called?
>> You are trying emulate Port driver work, aren't you. It is not easy.
>> If your target is Vista SP1 and up you should better use a Virtual
>> Storport miniport driver.
>> If you may also trace all communications between disk.sys to Port
>> Driver to check if you doing everything correctly. You could do it
>> because you have a lower filter class driver.
>> Another option is to write your own disk class driver. In this case
>> you need a bus driver also.
>>
>> Igor Sharovar
>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4595 (20091111) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>

>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4597 (20091111) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>



 
Reply With Quote
 
Peter
Guest
Posts: n/a

 
      11-13-2009
Hi,
It seems that the PNP knows what driver creates the PDO.
The PNP seems initiate a PDO in the different way by different drivers :
In my disk low filter driver, it receives only:
IRP_MJ_PNP[IRP_MN_START_DEVICE]
In the bus enum driver which is compiled from DDK sources
"\src\general\toaster\bus", it receives:
IRP_MJ_PNP[IRP_MN_QUERY_ID]
IRP_MJ_PNP[IRP_MN_QUERY_CAPABILITIES]
IRP_MJ_PNP[IRP_MN_QUERY_DEVICE_TEXT]
IRP_MJ_PNP[IRP_MN_QUERY_RESOURCE_REQUIREMENTS]
IRP_MJ_PNP[IRP_MN_QUERY_BUS_INFORMATION]
...

What the PNP will do after it knows a new PDO is created?
Any other info. about device stack and driver stack?

Best Regards,
Peter,

"Peter" <> ¦b¶l¥ó
news:eTqy%23% ¤¤¼¶¼g...
> Hi,
>
> I refer the following sources in the DDK to develop a disk low filter
> driver:
> \src\general\toaster\bus
> \src\storage\class\disk
>
> I would like to create a PDO in my disk low filter driver, and hope

the
> disk
> driver can see the PDO, but the result is the PDO does not appear in disk
> driver.
>
> The following are the main procedure in my disk low filter driver:
>
> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelati ons,
> IRP_MJ_PNP.IRP_MN_START_DEVICE
>
> Any comment for my problem, thanks.
>
> Best Regards,
> Peter,
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 09:11 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 11:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 11:20 PM
Re: Vista and IMate Jamin WMDC 6 RTM Problem Gary Waliczek [MSFT] ActiveSync 4 02-23-2007 07:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 10:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59