Why is my PCI driver's enumerator is “ROOT”?

Hi all,

I am trying to write my first driver for a PCI device using WDF.

I took the basic kmdf project template from Visual Studio, added a few relevant empty PNP callbacks, debug tracing and edited the .inf file to include the hardware id for the connected PCI device.

From the .inf file:

[Standard.NT$ARCH$]
%cvbkmd.DeviceDesc%=cvbkmd_Device, PCI\VEN_1172&DEV_424F; hw-id

Once I install the driver via the devcon tool, I can see something weird happening:

After a few hiccups in device manager, I can see 2 device instances under the same device class. one is a software driver (sits under ROOT) and the other is a proper PCI device.

Watching the driver debug traces in TraceView, I can see that all device event callbacks are called twice. once for each enumerator. when they are called with by the PCI enumerator, I get the parameters I expect from the PCI device. For example EVT_WDF_DEVICE_PREPARE_HARDWARE callback is called once with an empty TranlatedResources list and once with the PCI device resources as I would expect.

I tried to perform a windows restore and re-install the driver, but the problem still exists.

So what can cause my device being installed under ROOT?

“devcon install” will create a root enumerated device. you should only use “devcon update” to install your driver on the PCI enumerated device. You can safely delete the root enumerated device via device manager.

1 Like

“devcon install” is perhaps the most deceiving command ever invented. The oh-so-inviting name fools people into believing it does things that it doesn’t really do. In retrospect, maybe “devcon create” would have been a better choice.

1 Like

Thanks!