How to get the PDO from Scsiminiport driver

Hi,
I know there are lots of scsi miniport experts on this mailing list.
I am writing a scsi miniport driver that needs to talk to the bus driver
which sits below the scsi miniport driver. How can I get the PDO address? I
am thinking of getting the PDO and use that PDO address to make a call to
IoCallDriver(PDO, Irp).

I know in case of NIDS miniport you can get PDO address by making a call to
NdisMGetDeviceProperty().
Any help in getting the PDO address in case of scsi miniport driver is
highly appreciated.

Thanks,
Anil

You can’t, and stay within the bounds of a SCSIPORT miniport. The only way
to do that is to provide your own lateral edge that links with either NTDDK
or WDM. The quetion is why doyou want to do this? SCSIPORT really only works
one way … it owns the hardware and therefore the interrupt service
routine. If you try to do ANYTHING with the ISR owned by another bus driver,
you absolutely will incur a quantum delay because you will have to use the
ScsiPortNotification RequestTimer callback. Yes that has a granularity of
microseconds, but your call back is called at quantum intervals, usually 10
ms. Since SCSPORT is anathema to anything NTDDK or WDM, and such a driver
will not pass WHQL, the recommended means of doing what you want to do is to
write your own SCSI support code or use a third part support library such as
VSPORT from Storage Craft.

Ok that having been said … I have another means that will use SCSIPORT,
not WHQL’able. However, I would rather take that discussion offline.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
http://www.wd-3.com

“Keshavamurthy, Anil S” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> I know there are lots of scsi miniport experts on this mailing list.
> I am writing a scsi miniport driver that needs to talk to the bus driver
> which sits below the scsi miniport driver. How can I get the PDO address?
I
> am thinking of getting the PDO and use that PDO address to make a call to
> IoCallDriver(PDO, Irp).
>
>
> I know in case of NIDS miniport you can get PDO address by making a call
to
> NdisMGetDeviceProperty().
> Any help in getting the PDO address in case of scsi miniport driver is
> highly appreciated.
>
>
> Thanks,
> Anil
>
>
>

No one but you has ever hijacked a SCSI ISR Gary :slight_smile: If he needs to talk
to the bus driver below him, why must he use someone else’s ISR? Can’t
he just call the driver object and set a completion routine; given that
he solves all of the other virtual SCSI port issues.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Wednesday, April 16, 2003 6:11 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

You can’t, and stay within the bounds of a SCSIPORT miniport. The only
way
to do that is to provide your own lateral edge that links with either
NTDDK
or WDM. The quetion is why doyou want to do this? SCSIPORT really only
works
one way … it owns the hardware and therefore the interrupt service
routine. If you try to do ANYTHING with the ISR owned by another bus
driver,
you absolutely will incur a quantum delay because you will have to use
the
ScsiPortNotification RequestTimer callback. Yes that has a granularity
of
microseconds, but your call back is called at quantum intervals, usually
10
ms. Since SCSPORT is anathema to anything NTDDK or WDM, and such a
driver
will not pass WHQL, the recommended means of doing what you want to do
is to
write your own SCSI support code or use a third part support library
such as
VSPORT from Storage Craft.

Ok that having been said … I have another means that will use
SCSIPORT,
not WHQL’able. However, I would rather take that discussion offline.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
http://www.wd-3.com

“Keshavamurthy, Anil S” wrote in
message
news:xxxxx@ntdev…
>
> Hi,
> I know there are lots of scsi miniport experts on this mailing list.
> I am writing a scsi miniport driver that needs to talk to the bus
driver
> which sits below the scsi miniport driver. How can I get the PDO
address?
I
> am thinking of getting the PDO and use that PDO address to make a call
to
> IoCallDriver(PDO, Irp).
>
>
> I know in case of NIDS miniport you can get PDO address by making a
call
to
> NdisMGetDeviceProperty().
> Any help in getting the PDO address in case of scsi miniport driver
is
> highly appreciated.
>
>
> Thanks,
> Anil
>
>
>


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Jamey,

If the minport owns the ISR then he doesn’t. But that begs the question of
why he needs the PDO in a miniport in the first place. A true miniport only
has an opaque pointer to the driver object which it passes to
ScsiPortInitialize. To do anything with the Driver object he has to play
outside the sandbox. If that miniport does not own the ISR then that
sandbox is floating in a sewer and things can get smelly very fast.

This really really smells of a virtual miniport and we all know SCSPORT
hates those.


Gary G. Little
Have Computer, will travel …
(909) 6983191
(909) 5512105

:slight_smile:

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Wednesday, April 16, 2003 9:26 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

Jamey,

If the minport owns the ISR then he doesn’t. But that begs the question
of
why he needs the PDO in a miniport in the first place. A true miniport
only
has an opaque pointer to the driver object which it passes to
ScsiPortInitialize. To do anything with the Driver object he has to
play
outside the sandbox. If that miniport does not own the ISR then that
sandbox is floating in a sewer and things can get smelly very fast.

This really really smells of a virtual miniport and we all know SCSPORT
hates those.


Gary G. Little
Have Computer, will travel …
(909) 6983191
(909) 5512105


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

In my case, there is a bus driver below the scsiminiport to which I need to
talk. The bus driver below scsiminiport exports some driver entry points for
my scsiminiport driver. so I was thinking of getting hold of PDO and then I
can make a call to the lower level driver using that PDO. so my question is

  1. How can I get PDO
  2. If I can not get the PDO, how can I talk to bus driver which is below my
    scsiminiport driver.

-Anil

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Thursday, April 17, 2003 9:48 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

:slight_smile:

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Wednesday, April 16, 2003 9:26 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

Jamey,

If the minport owns the ISR then he doesn’t. But that begs the question
of
why he needs the PDO in a miniport in the first place. A true miniport
only
has an opaque pointer to the driver object which it passes to
ScsiPortInitialize. To do anything with the Driver object he has to
play
outside the sandbox. If that miniport does not own the ISR then that
sandbox is floating in a sewer and things can get smelly very fast.

This really really smells of a virtual miniport and we all know SCSPORT
hates those.


Gary G. Little
Have Computer, will travel …
(909) 6983191
(909) 5512105


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Add an upper filter driver to the stack for your SCSI device that gets the
entry points from the PDO and then uses IOCTL_SCSI_MINIPORT to pass this to
the miniport. You should perhaps make the bus driver export the entry points
as a PnP Interface so the upper filter can use IRP_MN_QUERY_INTERFACE to get
them.

/simgr

-----Original Message-----
From: Keshavamurthy, Anil S [mailto:xxxxx@intel.com]
Sent: Thursday, April 17, 2003 2:32 PM
To: NT Developers Interest List

In my case, there is a bus driver below the scsiminiport to which I need to
talk. The bus driver below scsiminiport exports some driver entry points for
my scsiminiport driver. so I was thinking of getting hold of PDO and then I
can make a call to the lower level driver using that PDO. so my question is

  1. How can I get PDO
  2. If I can not get the PDO, how can I talk to bus driver which is below my
    scsiminiport driver.

-Anil

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Thursday, April 17, 2003 9:48 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

:slight_smile:

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Wednesday, April 16, 2003 9:26 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

Jamey,

If the minport owns the ISR then he doesn’t. But that begs the question
of
why he needs the PDO in a miniport in the first place. A true miniport
only
has an opaque pointer to the driver object which it passes to
ScsiPortInitialize. To do anything with the Driver object he has to
play
outside the sandbox. If that miniport does not own the ISR then that
sandbox is floating in a sewer and things can get smelly very fast.

This really really smells of a virtual miniport and we all know SCSPORT
hates those.


Gary G. Little
Have Computer, will travel …
(909) 6983191
(909) 5512105


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The simplest way of doing that is to simply export the entry points in you
bus driver and let the miniport link to it. In your INF file define
“LoadOrderGroup = System Bus Extender” in the [Service_Inst] section. This
section loads before the SCSI miniport group. Given that all you want to do
is simply use those entry points within your bus driver. Do be aware that
synchronizing between your SCSI miniport and your bus driver is going a real
royal pain in the ass, and more than likely you will be at or above
DISPATCH_LEVEL when you enter your bus driver code.

This really becomes a DLL within a DLL within a DLL within a DLLlll … ooo
my head hurts.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
http://www.wd-3.com

“Graham, Simon” wrote in message
news:xxxxx@ntdev…
>
> Add an upper filter driver to the stack for your SCSI device that gets the
> entry points from the PDO and then uses IOCTL_SCSI_MINIPORT to pass this
to
> the miniport. You should perhaps make the bus driver export the entry
points
> as a PnP Interface so the upper filter can use IRP_MN_QUERY_INTERFACE to
get
> them.
>
> /simgr
>
>
> -----Original Message-----
> From: Keshavamurthy, Anil S [mailto:xxxxx@intel.com]
> Sent: Thursday, April 17, 2003 2:32 PM
> To: NT Developers Interest List
>
> In my case, there is a bus driver below the scsiminiport to which I need
to
> talk. The bus driver below scsiminiport exports some driver entry points
for
> my scsiminiport driver. so I was thinking of getting hold of PDO and then
I
> can make a call to the lower level driver using that PDO. so my question
is
> 1) How can I get PDO
> 2) If I can not get the PDO, how can I talk to bus driver which is below
my
> scsiminiport driver.
>
> -Anil
>
>
> -----Original Message-----
> From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
> Sent: Thursday, April 17, 2003 9:48 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver
>
>
> :slight_smile:
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
> Sent: Wednesday, April 16, 2003 9:26 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver
>
> Jamey,
>
> If the minport owns the ISR then he doesn’t. But that begs the question
> of
> why he needs the PDO in a miniport in the first place. A true miniport
> only
> has an opaque pointer to the driver object which it passes to
> ScsiPortInitialize. To do anything with the Driver object he has to
> play
> outside the sandbox. If that miniport does not own the ISR then that
> sandbox is floating in a sewer and things can get smelly very fast.
>
> This really really smells of a virtual miniport and we all know SCSPORT
> hates those.
>
> –
> Gary G. Little
> Have Computer, will travel …
> (909) 6983191
> (909) 5512105
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@intel.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

Thanks Gary. I will look forward to implement what you have suggested.

-Thanks again,
Anil

-----Original Message-----
From: Gary G. Little [mailto:xxxxx@aerosurf.net]
Sent: Thursday, April 17, 2003 5:01 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver

The simplest way of doing that is to simply export the entry points in you
bus driver and let the miniport link to it. In your INF file define
“LoadOrderGroup = System Bus Extender” in the [Service_Inst] section. This
section loads before the SCSI miniport group. Given that all you want to do
is simply use those entry points within your bus driver. Do be aware that
synchronizing between your SCSI miniport and your bus driver is going a real
royal pain in the ass, and more than likely you will be at or above
DISPATCH_LEVEL when you enter your bus driver code.

This really becomes a DLL within a DLL within a DLL within a DLLlll … ooo
my head hurts.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
http://www.wd-3.com

“Graham, Simon” wrote in message
news:xxxxx@ntdev…
>
> Add an upper filter driver to the stack for your SCSI device that gets the
> entry points from the PDO and then uses IOCTL_SCSI_MINIPORT to pass this
to
> the miniport. You should perhaps make the bus driver export the entry
points
> as a PnP Interface so the upper filter can use IRP_MN_QUERY_INTERFACE to
get
> them.
>
> /simgr
>
>
> -----Original Message-----
> From: Keshavamurthy, Anil S [mailto:xxxxx@intel.com]
> Sent: Thursday, April 17, 2003 2:32 PM
> To: NT Developers Interest List
>
> In my case, there is a bus driver below the scsiminiport to which I need
to
> talk. The bus driver below scsiminiport exports some driver entry points
for
> my scsiminiport driver. so I was thinking of getting hold of PDO and then
I
> can make a call to the lower level driver using that PDO. so my question
is
> 1) How can I get PDO
> 2) If I can not get the PDO, how can I talk to bus driver which is below
my
> scsiminiport driver.
>
> -Anil
>
>
> -----Original Message-----
> From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
> Sent: Thursday, April 17, 2003 9:48 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver
>
>
> :slight_smile:
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
> Sent: Wednesday, April 16, 2003 9:26 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get the PDO from Scsiminiport driver
>
> Jamey,
>
> If the minport owns the ISR then he doesn’t. But that begs the question
> of
> why he needs the PDO in a miniport in the first place. A true miniport
> only
> has an opaque pointer to the driver object which it passes to
> ScsiPortInitialize. To do anything with the Driver object he has to
> play
> outside the sandbox. If that miniport does not own the ISR then that
> sandbox is floating in a sewer and things can get smelly very fast.
>
> This really really smells of a virtual miniport and we all know SCSPORT
> hates those.
>
> –
> Gary G. Little
> Have Computer, will travel …
> (909) 6983191
> (909) 5512105
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@intel.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com