- Adding Child Device to Stack
- Posted by Sushma on June 10th, 2008
Hello All,
I've got a PCI device which has a flash media slot present on it. I
want the flash media slot to be installed as a child device to PCI and
attach the child device to disk device.
I have both the WDM and KMDF version of driver. I have just started
the KMDF version. In KMDF after adding the child device i did not
find the device correctly in the stack. However, WDM version is
working fine.
My question is:
Can any let me know if im missing any initialization in KMDF driver so
that the child device is added under disk device stack. Im inserting
the KMDF and WDM sample source and devicestack in this thread.
In KMDF version i did the following,
PrepareHardware(WDFDEVICE dev,...)
{
- Posted by Doron Holan [MSFT] on June 10th, 2008
did you use the KMDF APIs to add hardware or compatible IDs to the child?
device instance ID?
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sushma" <sushma.yella@gmail.com> wrote in message
news:50868dba-c7e8-41f5-b2ac-1663d7b5795e@u6g2000prc.googlegroups.com...
- Posted by Sushma on June 11th, 2008
Yes Doron, I had used KMDF APIs to add hardware, device instance Id
and compatible IDs. One other thing i forgot to mention is i have not
yet handled prepare hardware, Internal Device IO Control and Device IO
Control codes in the child device.
Will this make any difference? I m not sure but may be if i finish
with these module the stack will be intact.
Thanks and Regards,
Sushma
- Posted by Doron Holan [MSFT] on June 11th, 2008
it should not make a difference. i would run !locks to see if the pnp lock
is held by some other thread. i am guessing that you are blocking some
thread which has pended a state changing pnp irp in the parent WDFDEVICE
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sushma" <sushma.yella@gmail.com> wrote in message
news:ab761722-966a-46dc-b3f0-10d8f83db7c8@s21g2000prm.googlegroups.com...
- Posted by Sushma on June 11th, 2008
Thanks Doron for the reply. Actually, i have implemented some of the
IOCTLs but i din not get any calls. When i made the queue as
PowerManaged=FALSE, i got the IOCTL and rest is working is fine. I
could see the stack correctly placed now.
I saw one of your previous thread having similiar problem and you
suggested the same (making powermanaged=false). But i have one more
question, at the end of the thread you suggested to maintain two
queues for IOCTLs one which could run without full power and other
which requires power.
How could i know that which IOCTL requires complete power and other
IOCTLs which does not require complete power? Is there any
documentation provided for that?
Thanks and Regards,
Sushma
- Posted by Doron Holan [MSFT] on June 11th, 2008
no, there is no documenation for that. by looking at how you process the
IOCTL you can tell if you need power for the ioctl or not.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sushma" <sushma.yella@gmail.com> wrote in message
news:25662279-732a-43ec-bc38-aba237b2f415@w34g2000prm.googlegroups.com...
- Posted by Sushma on June 12th, 2008
I think all the read / write requests need to power managed as they
need to access the device. The requests which access the device may
require the queue to be power managed.
If i have request which should be handled in working state and i set
powermanaged as false what is the out come of that request? Will i
lose that request or will it be requeued?
Thanks for the help.
Regards,
Sushma
- Posted by Doron Holan [MSFT] on June 13th, 2008
are you asking what happens when a request which requires power is inserted
into a non power managed queue while the device is off? the request will be
presented to your driver. you can then forward the request to a new
WDFQUEUE which is power managed. this will bring the device back into the
working state.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sushma" <sushma.yella@gmail.com> wrote in message
news:cebae022-0d85-4886-9328-6795573217a0@l28g2000prd.googlegroups.com...