Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Can I ask the PCI driver to save/restore PCI config space?

Shane_CorbinShane_Corbin Member Posts: 307
edited November 1 in NTDEV

I have a device I need to hard reset while the system is running. In which case I need to restore all of config space. What are my options?


  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,718

    Your best option by far is to fix the hardware problem that leads you to want a hard reset. Hard reset should NEVER be used in a production system. Ever. It's a band aid in an attempt to hide a failure.

    If the system is hotplug-enabled (most are not), you can drop off the bus and re-appear, and the OS will re-enumerate you. Otherwise, whatever you do is going to be a horrible hack.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Shane_CorbinShane_Corbin Member Posts: 307

    Would love to fix it in hardware, but not sure how. I have an issue with tx credit counters. Half are in our logic the other half are in the pcie core. CvP resets our logic counters, but the pcie core counters don't reset. Hard reset gets them back both in sync. Maybe there's a way to get the pcie cores counters to reset without a hard reset. If there is, I don't know it.

    Could I use WdfDeviceSetDeviceState to disable/enable my device to notify the PnP manager in some way to reconfigure the device?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online