Get HBA PDO from volume device filter driver...

I have to write W2K volume device filter driver which attaches only to
volumes connected to specific HBA.
My current test filter is based on “diskperf” sample from DDK.

So, my QUESTION is:
How can I obtain PDO of the SCSI adapter from AddDevice() routine???

If I have it, I could call IoGetDeviceProperty() and see if this is my
HBA…

P.S. I’ve got ScsiPortN, TargetId and LUNId with IOCTL_SCSI_GET_ADDRESS and
I could get needed information after
few registry reads, but it seems as too ugly solution.

Kristian


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Well, I believe that the PDEVICE_OBJECT is actually passed into the
AddDevice() as
a parameter. AddDevice is called by the Plug N Play Manager.

HTH,
Asher

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@atia.com
Sent: Tuesday, January 15, 2002 11:00 AM
To: NT Developers Interest List
Subject: [ntdev] Get HBA PDO from volume device filter driver…

I have to write W2K volume device filter driver which attaches only to
volumes connected to specific HBA.
My current test filter is based on “diskperf” sample from DDK.

So, my QUESTION is:
How can I obtain PDO of the SCSI adapter from AddDevice() routine???

If I have it, I could call IoGetDeviceProperty() and see if this is my
HBA…

P.S. I’ve got ScsiPortN, TargetId and LUNId with IOCTL_SCSI_GET_ADDRESS and
I could get needed information after
few registry reads, but it seems as too ugly solution.

Kristian


You are currently subscribed to ntdev as: xxxxx@aam-ch.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

IIRC there were some IOCTL_SCSI_xxx or IOCTL_STORAGE_xxx requests to determine the miniport name, though I’m not sure of it.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Tuesday, January 15, 2002 11:00 AM
Subject: [ntdev] Get HBA PDO from volume device filter driver…

> I have to write W2K volume device filter driver which attaches only to
> volumes connected to specific HBA.
> My current test filter is based on “diskperf” sample from DDK.
>
>
>
> So, my QUESTION is:
> How can I obtain PDO of the SCSI adapter from AddDevice() routine???
>
> If I have it, I could call IoGetDeviceProperty() and see if this is my
> HBA…
>
>
> P.S. I’ve got ScsiPortN, TargetId and LUNId with IOCTL_SCSI_GET_ADDRESS and
> I could get needed information after
> few registry reads, but it seems as too ugly solution.
>
>
> Kristian
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

----- Original Message -----
From: “Asher Hoodin”
To: “NT Developers Interest List”
Sent: Tuesday, January 15, 2002 6:36 PM
Subject: [ntdev] RE: Get HBA PDO from volume device filter driver…

> Well, I believe that the PDEVICE_OBJECT is actually passed into the
> AddDevice() as
> a parameter. AddDevice is called by the Plug N Play Manager.
>
> HTH,
> Asher

Asher,

the PDOs in my AddDevice routine are

1) PDOs that represents disk devices (they are created by the HBA driver to
represent devices on its bus) - attaching to them I will filter physical
drives.

2) PDOs that represents disk partitions ( they are created by the Disk
Class driver ) - thus I can filter logical drives.

Anyway, if I use these PDO’s in IoGetDeviceProperty() I will receive
information for the particular storage connected to the HBA, not for the
HBA.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On 01/15/02, ““Maxim S. Shatskih” ” wrote:
> IIRC there were some IOCTL_SCSI_xxx or IOCTL_STORAGE_xxx requests to determine the miniport name, though I’m not sure of it.
>
> Max

Thanks,
I’m going to dig all the DDK help for this kind of IOCTL’s.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com