How to communicate between two StorPort devices

I have a Storport device driver and two same devices are installed.
Sometimes I want to send a command such as reset from on adapter to another.
How to send this kind of SRB in miniport driver? The same way as
IoCallDriver(…)?

Best regards,
David Zeng

How about a direct call? It your binary, you know all DEVICE_EXTENSION addresses, you call your own functions.

Use a higher level service that can issue the SRB.

Mark Roddy

On Wed, Jul 24, 2013 at 2:19 AM, David wrote:

> I have a Storport device driver and two same devices are installed.
> Sometimes I want to send a command such as reset from on adapter to
> another.
> How to send this kind of SRB in miniport driver? The same way as
> IoCallDriver(…)?
>
> –
>
> Best regards,
> David Zeng
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers 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

>How about a direct call? It your binary, you know all DEVICE_EXTENSION
addresses, you call your own functions.

Though I am not an OP, Alex, can you please elaborate what you mean by “direct call”? Do you mean having a shared block of memory where both drivers can maintain the list of shared function pointers?

xxxxx@yahoo.com wrote:

> How about a direct call? It your binary, you know all DEVICE_EXTENSION addresses, you call your own functions.
Though I am not an OP, Alex, can you please elaborate what you mean by “direct call”? Do you mean having a shared block of memory where both drivers can maintain the list of shared function pointers?

If you have two StorPort devices with the same driver, you don’t NEED a
table of function pointers. You can just call the functions using the
other device’s PDEVICE_OBJECT


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>If you have two StorPort devices with the same driver, you don’t NEED a
table of function pointers. You can just call the functions using the
other device’s PDEVICE_OBJECT

Thanks Tim! I understand that, however, I have a question though. If I directly call the dispatch routines (or even function pointer method) for an IRP, won’t it cause potential issue if incase one of the stacks has an additional filter attached below the FDO (stack location will mismatch - not necessarily in OP’s case)?

Thanks for the clarification, much appreciated.

xxxxx@yahoo.com wrote:

Thanks Tim! I understand that, however, I have a question though. If I directly call the dispatch routines (or even function pointer method) for an IRP, won’t it cause potential issue if incase one of the stacks has an additional filter attached below the FDO (stack location will mismatch - not necessarily in OP’s case)?

Yes. You can’t arbitrarily take an IRP that was delivered to one device
stack and pass it down to another device stack. If the called function
needed to send requests down the stack, it would have to create a new IRP.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.