PCIe Link Speed

Hey All,
So I got all the parts of my KMDF driver for my board all set up and working. I’m now dealing with getting the speed of DMA transfers as fast as possible. One big problem I’m having is my PCIe link speed is not always (but it’s not never either) at it’s maximum capable speed. This information is read straight of the board’s PCI configuration space and some DMA data rate benchmarking test code I have confirms the speed to be significantly lower than expected when the link speed isn’t at it’s maximum. I’m running Windows 10 pro and my board is a x8 capable of 8GT/s but the link speed is often dropped down to 2.5 GT/s. This should be controllable via the control panel under hardware and sound->change power-saving settings->high performance (change plan settings)->change advanced power settings->pci express->link power state management->settings, but I have made sure this is disabled. My device already has a working Linux driver which is consistently running at the maximum link speed, so this likely isn’t a BIOS or board problem but something specific to Windows. Does anybody know what could be causing this issue? Is there some API function or some property I can set near the WdfDeviceCreate() call to control the link speed?
Thanks!!!


What says the logic analyzer guy?

– pa

This appears to only happen based on how the driver is loaded. When you install it by right clicking and selecting install on an INF file, this problem happens. The problem also happens when you enable a previously disabled driver in the device manager. If the driver is loaded by restarting windows and is loaded as part of the startup process the link speed is correct at the maximum capacity and stays that way.