Re: Receiving IOCTLs in a KMDF bus driver

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



when you create a PDO, create as many WDFQUEUEs on the device as you need to
handle the I/O. as don states, WDFQUEUEs created onthe FDO do not apply to
the PDOs you create

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.


"Don Burn" <burn@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OTnDPpbhHHA.3452@xxxxxxxxxxxxxxxxxxxxxxx
I suspect in your WDM bus driver you were not distinguishing between
devices for IOCTL handling, so your child drivers were sending the IOCTL to
the PDO and you were processing it. In KMDF each device has a set of
handlers, and the bus toaster bus driver only handles the IOCTL requests on
the control decide.

If this is the case, you either need to modify the upper drivers, or add a
queue handler to the bus driver so that PDO can see IOCTL's.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"EricH" <EricH@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F9939577-151E-44F7-B781-CD58137A92DC@xxxxxxxxxxxxxxxx
My company is moving an existing device to a new bus. To preserve
existing
device driver code, I am trying out the toaster's bus example.

While I have made the Dynamic Bus Enumerator load my device, its IoQueues
are not receiving the IOCTLs if sent from the child. When I replace the
KMDF
bus driver with the WDM bus driver, I can easily capture the IOCTL IRPs.

Using IrpTrace from OSR, I can see that the IRPs from the child device
driver are being generated in both cases. Only in the KMDF case, the IRP
returns with INVALID_DEVICE_REQUEST. I assume that the WDF default code
is
completing the IRP silently.

What needs to be done to modify the toaster bus sample to permit IOCTLs
from
child devices to be processed?

Thank you,
Eric




.



Relevant Pages

  • Re: USB bus filter problem with UpdateDriverForPlugAndPlayDevices
    ... Isn't it sitting on the hub driver? ... >> As a bus filter, you should still be attached to the PDO when the remove ... Your filter should detach and delete only when the bus driver ...
    (microsoft.public.development.device.drivers)
  • Re: Smartcard reader driver architecture, please help !!!!
    ... are you using KMDF or WDM for your bus driver? ... fwding all USB IO traffic from the PDO to the FDO is problematic. ... the bus driver will create a PDO to the smartcard function dirver. ...
    (microsoft.public.development.device.drivers)
  • Re: IRP_MN_SURPRISE_REMOVE
    ... If you exclude the PDO in a function driver, ... The problem is you have no way to convince the bus driver to DELETE the PDO. ...
    (microsoft.public.development.device.drivers)
  • Re: DeviceIOControl
    ... And MSDV.SYS was a stream class minidriver. ... > PDO for KS based minidriver is owned by the class driver. ... > an extra PDO and make it a target for your IOCTL). ...
    (microsoft.public.development.device.drivers)
  • Re: Smartcard reader driver architecture, please help !!!!
    ... I chose bus driver as: we currently have a win application which is ... The PDO will be implemented all the ... sc function driver and the PDO will talk to each other by using the protocol ...
    (microsoft.public.development.device.drivers)