KMDF handling of internal IOCTLs



Hi,

I'm having trouble with my very first KMDF driver. Starting from the KMDF Toaster bus sample, I've tried to add a handler for IRP_MJ_INTERNAL_DEVICE_CONTROL.

Problem is: The function driver above the bus driver still receives STATUS_INVALID_DEVICE_REQUEST for any internal IOCTL that it submits. My handler function, as far as I can tell, is never called, and the WDF trace for my bus driver also tells me "FxPkgIo::Dispatch - No queue configured for WDFDEVICE 0x7DE5F3C8, failing WDFREQUEST 0x7DDBAE08, 0xc0000010 (STATUS_INVALID_DEVICE_REQUEST)".

Here's the part of the Toaster bus function Bus_EvtDeviceAdd(), where the default queue is created, and where I tried to add my handler:

WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE( &queueConfig,
WdfIoQueueDispatchParallel );
queueConfig.EvtIoDeviceControl
= Bus_EvtIoDeviceControl;
queueConfig.EvtIoInternalDeviceControl
= Bus_EvtIoInternalDeviceControl; // <--
status = WdfIoQueueCreate( device, &queueConfig,
WDF_NO_OBJECT_ATTRIBUTES, &queue );

WdfIoQueueCreate() returns success, and handling of regular IOCTLs still works just fine. My own function Bus_EvtIoInternalDeviceControl() is just a stripped-down copy of the original Toaster Bus_EvtIoDeviceControl() (which at the moment does little more than KdPrint() and WdfRequestCompleteWithInformation()).

Is that not how it's done? What detail am I missing?
.



Relevant Pages

  • Re: [patch 4/4] genirq: add support for threaded interrupt handlers
    ... _all_ drivers to have their interrupt handlers automagically called from ... process context with no driver changes. ... the threaded interrupt handler model contrary to the preempt-rt patch ... stuff that now needs softirq could be directly done in the ...
    (Linux-Kernel)
  • Re: [PATCH] OMAP: Keypad driver
    ... I don't think the tasklet stopping code is correct. ... But the just-killed timer handler might have ... I will update the driver and submit the patch. ... May changelog needs URL entry like http://linux.omap.com _or_ ...
    (Linux-Kernel)
  • Re: Wifi woes - views on this PB debug trace?
    ... standard 802.3 driver to the ip stack, ... contact with the vendor, but I'd its always worth getting a basic ... SetSlotInterface: ... NOT using OPTIMIZED RX handler ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [patch 4/4] genirq: add support for threaded interrupt handlers
    ... A typical device driver will do: ... disabled during the execution of the IRQ handler. ... The quickcheck handler has disabled the device interrupt? ...
    (Linux-Kernel)
  • Re: Wifi woes - views on this PB debug trace?
    ... driver will either identify itself as a wireless driver, in which case, the ... bitmap of what's being displayed when you plug the card in, ... SetSlotInterface: ... NOT using OPTIMIZED RX handler ...
    (microsoft.public.windowsce.platbuilder)