Ref:Scsiport PDO filter driver.

Hi,
I am trying to get hold of the IRP_MN_QUERY_ID call to
the disk PDO. My intention is to get rid of the
GENDISK so that the PNP Manager cant load disk.sys to
the diskPDO instead I can load a virtual disk to it.

Initially I thought of making lower class disk filter
driver to achieve it…but looks like it is too late as
the disk.sys starts sending SRB_FUNCTION_CLAIM_DEVICE
to it which if I fail in Windows.NET leads to the
removal of the disk.

On the second thought, after getting some inputs from
the mailing list, I tried making a SCSIport filter
driver, but looks like it would only sit on top of the
FDOs not the PDO’s. So I am getting
IRP_MN_QUERY_dEVICE_RELATIONS for the adapter but not
able to catch IRP_MN_QUERY_ID for the Disk PDO.

How should I get hold of this PNP call…looks like I
need to write a SCSIport PDO filter driver and I dont
have any idea of writing inf for this filter driver.

Any hints would be appreciated.

Thanks and Regards


Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com

“Gurpreet Anand” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> I am trying to get hold of the IRP_MN_QUERY_ID call to
> the disk PDO. My intention is to get rid of the
> GENDISK so that the PNP Manager cant load disk.sys to
> the diskPDO instead I can load a virtual disk to it.
>
> Initially I thought of making lower class disk filter
> driver to achieve it…but looks like it is too late as
> the disk.sys starts sending SRB_FUNCTION_CLAIM_DEVICE
> to it which if I fail in Windows.NET leads to the
> removal of the disk.
>
> On the second thought, after getting some inputs from
> the mailing list, I tried making a SCSIport filter
> driver, but looks like it would only sit on top of the
> FDOs not the PDO’s. So I am getting
> IRP_MN_QUERY_dEVICE_RELATIONS for the adapter but not
> able to catch IRP_MN_QUERY_ID for the Disk PDO.
>
> How should I get hold of this PNP call…looks like I
> need to write a SCSIport PDO filter driver and I dont
> have any idea of writing inf for this filter driver.
>
> Any hints would be appreciated.

If you just want to load a different class driver in place of the disk
driver, you can use SetupDiSetDeviceRegistryProperty() to change the device
service (function driver) to your custom driver. You won’t need the filter
at all. If you really need the filter, and really need to munge the PnP ID
strings, it’s possible to make a bus PDO filter, but it’s undocumented.
Search the archive for this list for discussions of both issues, sometimes
in the same thread. After you have looked hard at that info, if you have
specific questions about implementing either approach, please ask.

Phil

Philip D. Barila
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.

Phil,
Yeah I went through almost all the threads linking to
this issue. I believe you also went through same kind
of issue some time back.
I would like to make a bus PDO filter driver as per my
requirements.
Right now I am not clear as to how to install this
driver. What changes I need to do in the inf file to
install my driver as a PDO filter driver.

Thanks and Regards,
Gurpreet

— Phil Barila wrote:
> “Gurpreet Anand” wrote in
> message
> news:xxxxx@ntdev…
> >
> > Hi,
> > I am trying to get hold of the IRP_MN_QUERY_ID
> call to
> > the disk PDO. My intention is to get rid of the
> > GENDISK so that the PNP Manager cant load disk.sys
> to
> > the diskPDO instead I can load a virtual disk to
> it.
> >
> > Initially I thought of making lower class disk
> filter
> > driver to achieve it…but looks like it is too
> late as
> > the disk.sys starts sending
> SRB_FUNCTION_CLAIM_DEVICE
> > to it which if I fail in Windows.NET leads to the
> > removal of the disk.
> >
> > On the second thought, after getting some inputs
> from
> > the mailing list, I tried making a SCSIport filter
> > driver, but looks like it would only sit on top of
> the
> > FDOs not the PDO’s. So I am getting
> > IRP_MN_QUERY_dEVICE_RELATIONS for the adapter but
> not
> > able to catch IRP_MN_QUERY_ID for the Disk PDO.
> >
> > How should I get hold of this PNP call…looks like
> I
> > need to write a SCSIport PDO filter driver and I
> dont
> > have any idea of writing inf for this filter
> driver.
> >
> > Any hints would be appreciated.
>
> If you just want to load a different class driver in
> place of the disk
> driver, you can use
> SetupDiSetDeviceRegistryProperty() to change the
> device
> service (function driver) to your custom driver.
> You won’t need the filter
> at all. If you really need the filter, and really
> need to munge the PnP ID
> strings, it’s possible to make a bus PDO filter, but
> it’s undocumented.
> Search the archive for this list for discussions of
> both issues, sometimes
> in the same thread. After you have looked hard at
> that info, if you have
> specific questions about implementing either
> approach, please ask.
>
> Phil
> –
> Philip D. Barila
> Seagate Technology, LLC
> (720) 684-1842
> As if I need to say it: Not speaking for Seagate.
> E-mail address is pointed at a domain squatter. Use
> reply-to instead.
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

None. You have to make the driver filter the PDOs. It’s a lot easier to
just change the service, if you don’t absolutely need the bus PDO filter.

Phil

Philip D. Barila
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.
“Gurpreet Anand” wrote in message
news:xxxxx@ntdev…
>
> Phil,
> Yeah I went through almost all the threads linking to
> this issue. I believe you also went through same kind
> of issue some time back.
> I would like to make a bus PDO filter driver as per my
> requirements.
> Right now I am not clear as to how to install this
> driver. What changes I need to do in the inf file to
> install my driver as a PDO filter driver.

None. You have to make the driver filter the PDOs. As in, you have to
change the code. It’s a lot easier to just change the service, if you don’t
absolutely need the bus PDO filter.

Phil

Philip D. Barila
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.

Thanks Phil,
I think you are right abt writing a service.
But I want to try making a bus pdo filter driver may
be for my knowledge sake.
Following is what I have learned. Correct me if I am
wrong.
I’ll write a bus filter driver which will sit on top
of the controller FDO.
From the IRP_MN_deVICE_rELATIONS for my controller,
I’ll take out the Disks PDO and call AddDevice() for
those PDOs(I believe I can call AddDevice() from
there, which I have never tried it before).

I’ll try and let u know abt it.

Thanks and Regards,
Gurpreet

— Phil Barila wrote:
> None. You have to make the driver filter the PDOs.
> It’s a lot easier to
> just change the service, if you don’t absolutely
> need the bus PDO filter.
>
> Phil
> –
> Philip D. Barila
> Seagate Technology, LLC
> (720) 684-1842
> As if I need to say it: Not speaking for Seagate.
> E-mail address is pointed at a domain squatter. Use
> reply-to instead.
> “Gurpreet Anand” wrote in
> message
> news:xxxxx@ntdev…
> >
> > Phil,
> > Yeah I went through almost all the threads linking
> to
> > this issue. I believe you also went through same
> kind
> > of issue some time back.
> > I would like to make a bus PDO filter driver as
> per my
> > requirements.
> > Right now I am not clear as to how to install this
> > driver. What changes I need to do in the inf file
> to
> > install my driver as a PDO filter driver.
>
> None. You have to make the driver filter the PDOs.
> As in, you have to
> change the code. It’s a lot easier to just change
> the service, if you don’t
> absolutely need the bus PDO filter.
>
> Phil
> –
> Philip D. Barila
> Seagate Technology, LLC
> (720) 684-1842
> As if I need to say it: Not speaking for Seagate.
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

You might or you might not be able to use your AddDevice routine to insert
PDO filter device objects, it depends on what your AddDevice routine does.
The important part is to monitor the IRP_MN_QUERY_DEVICE_RELATIONS type
BusRelations requests to the bus driver, noting new PDOs reported by the bus
driver (on the completion side of course,) and attaching your filter device
objects to these new PDOs using the appropriate DDK requests. You also have
to worry about exactly how and when you detach your filter device objects,
as IRP_MN_REMOVE requests are insufficient triggers for bus filter drivers.

I think Phil was trying to encourage you to avoid this solution if there are
other alternatives that will work for you, as it is complicated. That was
good advice.

-----Original Message-----
From: Gurpreet Anand [mailto:xxxxx@yahoo.com]
Sent: Monday, June 16, 2003 8:33 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Ref:Scsiport PDO filter driver.

Thanks Phil,
I think you are right abt writing a service.
But I want to try making a bus pdo filter driver may
be for my knowledge sake.
Following is what I have learned. Correct me if I am
wrong.
I’ll write a bus filter driver which will sit on top
of the controller FDO.
From the IRP_MN_deVICE_rELATIONS for my controller,
I’ll take out the Disks PDO and call AddDevice() for
those PDOs(I believe I can call AddDevice() from
there, which I have never tried it before).

I’ll try and let u know abt it.

Thanks and Regards,
Gurpreet

Thanks Mark & Phil.
I think you guys are right about it.
Now I am writing a utility to change the GENDISK to
say MYDRIVER. I believe that would take care of
everything.
If I succeed with this utility, I will try to explore
the other option too.

Thanks again for the help.

Regards,
Gurpreet

— “Roddy, Mark” wrote:
>
> You might or you might not be able to use your
> AddDevice routine to insert
> PDO filter device objects, it depends on what your
> AddDevice routine does.
> The important part is to monitor the
> IRP_MN_QUERY_DEVICE_RELATIONS type
> BusRelations requests to the bus driver, noting new
> PDOs reported by the bus
> driver (on the completion side of course,) and
> attaching your filter device
> objects to these new PDOs using the appropriate DDK
> requests. You also have
> to worry about exactly how and when you detach your
> filter device objects,
> as IRP_MN_REMOVE requests are insufficient triggers
> for bus filter drivers.
>
> I think Phil was trying to encourage you to avoid
> this solution if there are
> other alternatives that will work for you, as it is
> complicated. That was
> good advice.
>
> -----Original Message-----
> From: Gurpreet Anand
> [mailto:xxxxx@yahoo.com]
> Sent: Monday, June 16, 2003 8:33 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: Ref:Scsiport PDO filter driver.
>
>
> Thanks Phil,
> I think you are right abt writing a service.
> But I want to try making a bus pdo filter driver may
> be for my knowledge sake.
> Following is what I have learned. Correct me if I am
> wrong.
> I’ll write a bus filter driver which will sit on top
> of the controller FDO.
> From the IRP_MN_deVICE_rELATIONS for my controller,
> I’ll take out the Disks PDO and call AddDevice() for
> those PDOs(I believe I can call AddDevice() from
> there, which I have never tried it before).
>
> I’ll try and let u know abt it.
>
> Thanks and Regards,
> Gurpreet
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com