I have a bus driver that creates a few children PDO and I have function
driver for each PDO. I need to set some config info in the function driver
from my bus driver. Which function driver will need changes config info
that I’ll select from bus driver’s PDO list. I used IRP_MN_QUERY_INTERFACE
to get config values for function driver from its PDO and that works, I
got it from toaster. But, now I need to set config info from bus driver to
function driver. I belive the same IRP_MN_QUERY_INTERFACE can be used but
I’m not getting ways to get the right device object that I can use in
IoCallDriver in the bus driver with reference to PDO that will route the
IRP to its function driver.
It does not have to be by IRP_MN_QUERY_INTERFACE but one of the
possibility I’m looking at.
I also think that there are other ways to do it.
I think IoGetAttachedDeviceReference might be of some help to you.
It returns the topmost device object in a stack. Then sending your irp down
that stack will eventually be received by your function driver.
Mat
-----Original Message-----
From: xxxxx@yahoo.ca [mailto:xxxxx@yahoo.ca]
Sent: Wednesday, May 14, 2003 4:19 PM
To: NT Developers Interest List
Subject: [ntdev] sending request from PDO to its function driver
Hi All,
I have a bus driver that creates a few children PDO and I have function
driver for each PDO. I need to set some config info in the function driver
from my bus driver. Which function driver will need changes config info
that I’ll select from bus driver’s PDO list. I used IRP_MN_QUERY_INTERFACE
to get config values for function driver from its PDO and that works, I
got it from toaster. But, now I need to set config info from bus driver to
function driver. I belive the same IRP_MN_QUERY_INTERFACE can be used but
I’m not getting ways to get the right device object that I can use in
IoCallDriver in the bus driver with reference to PDO that will route the
IRP to its function driver.
It does not have to be by IRP_MN_QUERY_INTERFACE but one of the
possibility I’m looking at.
I also think that there are other ways to do it.
I think IoGetAttachedDeviceReference might be of some help to you.
It returns the topmost device object in a stack. Then sending your irp down
that stack will eventually be received by your function driver.
Mat
-----Original Message-----
From: xxxxx@yahoo.ca [mailto:xxxxx@yahoo.ca]
Sent: Wednesday, May 14, 2003 4:19 PM
To: NT Developers Interest List
Subject: [ntdev] sending request from PDO to its function driver
Hi All,
I have a bus driver that creates a few children PDO and I have function
driver for each PDO. I need to set some config info in the function driver
from my bus driver. Which function driver will need changes config info
that I’ll select from bus driver’s PDO list. I used IRP_MN_QUERY_INTERFACE
to get config values for function driver from its PDO and that works, I
got it from toaster. But, now I need to set config info from bus driver to
function driver. I belive the same IRP_MN_QUERY_INTERFACE can be used but
I’m not getting ways to get the right device object that I can use in
IoCallDriver in the bus driver with reference to PDO that will route the
IRP to its function driver.
It does not have to be by IRP_MN_QUERY_INTERFACE but one of the
possibility I’m looking at.
I also think that there are other ways to do it.
I have a bus driver that creates a few children PDO and I have function
driver for each PDO. I need to set some config info in the function driver
from my bus driver. Which function driver will need changes config info
that I’ll select from bus driver’s PDO list. I used IRP_MN_QUERY_INTERFACE
to get config values for function driver from its PDO and that works, I
got it from toaster. But, now I need to set config info from bus driver to
function driver. I belive the same IRP_MN_QUERY_INTERFACE can be used but
I’m not getting ways to get the right device object that I can use in
IoCallDriver in the bus driver with reference to PDO that will route the
IRP to its function driver.
Is this for suballocating I/O resources that nominally belong to the
PDO? If so, you might want to take a look at the scheme used in my WDM
book’s MULFUNC sample. It uses an upper filter to get resource
assignments from the parent driver (using IRP_MN_QUERY_INTERFACE) and
then feeds them into the function driver in the regular START_DEVICE
request. The function driver doesn’t even need to be aware that it’s
sharing resources belonging to the parent device.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
> Is this for suballocating I/O resources that nominally belong to the
PDO?
No, it is some variable value that I want to share with PDO and function
driver.
It seems IoGetAttachedDeviceReference works.
Thanks,
Hablu
xxxxx@yahoo.ca wrote:
> I have a bus driver that creates a few children PDO and I have function
> driver for each PDO. I need to set some config info in the function driver
> from my bus driver. Which function driver will need changes config info
> that I’ll select from bus driver’s PDO list. I used IRP_MN_QUERY_INTERFACE
> to get config values for function driver from its PDO and that works, I
> got it from toaster. But, now I need to set config info from bus driver to
> function driver. I belive the same IRP_MN_QUERY_INTERFACE can be used but
> I’m not getting ways to get the right device object that I can use in
> IoCallDriver in the bus driver with reference to PDO that will route the
> IRP to its function driver.
Is this for suballocating I/O resources that nominally belong to the
PDO? If so, you might want to take a look at the scheme used in my WDM
book’s MULFUNC sample. It uses an upper filter to get resource
assignments from the parent driver (using IRP_MN_QUERY_INTERFACE) and
then feeds them into the function driver in the regular START_DEVICE
request. The function driver doesn’t even need to be aware that it’s
sharing resources belonging to the parent device.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com