How to implements multi function device driver?

宝林 姜 1 Reputation point
2022-05-31T10:57:36.5+00:00

I am developing a driver, the requirements is that a pcie card has two bar space, bar0 is used for dma, bar1 is used for 4 COMPORT.
I read microsoft doc about bus driver, and i think i can use bus driver to complete this requirements.
I modify the toaster static bus driver, add a dma child device, 4 COMPORT child device.
because dma need to use interrupt, so i use WdfDmaEnablerCreate to create dma enabler. but it always return STATUS_UNSUCCESSFUL.
but if i pass the bus device to the first param, it success:
status = WdfDmaEnablerCreate(pdo_ext->ParentDevice, &dmaConfig, WDF_NO_OBJECT_ATTRIBUTES, &xdma->dmaEnabler);
but the interrupt isr could not invoke.

i am now confusing how can i complete this requirement, the doc of bus driver and multifunction driver is too short, i need more information.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,399 questions
0 comments No comments
{count} votes