I’ve been developing a KMDF driver for a new custom multiport serial device that uses the Xilinx XDMA for DMA. Mostly it’s fine, but for some reason I am completely unable to get an interrupt. I follow all the steps in Microsoft’s guides for creating an ISR DPC, I have compared it to a previous product we developed that works just fine. The interrupt resource shows up appropriately in PrepareHardware, I get no errors in the process at any step that indicates that the interrupt shouldn’t fire. The interrupts trigger just fine in Linux. I had the firmware developer make a temporary register that should cause an interrupt storm when I set a specific bit. I even downloaded some trial software that allowed me to see that interrupts were happening, but the ISR itself never triggers. I have DbgPrints in InterruptEnable and InterruptDisable telling me that the interrupt should be enabled. Nothing I do will cause the ISR to fire.
Here’s the code in DeviceAdd:
WDF_INTERRUPT_CONFIG_INIT(&interruptConfig, newproject_isr, NULL);
interruptConfig.ShareVector = WdfTrue;
interruptConfig.EvtInterruptEnable = EvtWdfInterruptEnable;
interruptConfig.EvtInterruptDisable = EvtWdfInterruptDisable;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&interruptAttributes, NEWPROJECT_PORT);
status = WdfInterruptCreate(port->device, &interruptConfig, &interruptAttributes, &port->interrupt);
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, TRACE_DEVICE, "WdfInterruptCreate failed %x\n", status);
return 0;
}
At no point in any step of the process do I get an error.
Is there some magic trick I’m overlooking? Some pitfall I may not know about? Everything suggests the isr should fire, and the first thing I do in the isr is a debug print, and I never see a single one.
I’m tearing my hair out here, thanks.