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

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category, below.

Transition to D0?

Greetings,
I'm working on an driver for a custom FPGA PCIe card. This card is an early version, and reportedly does not support PCIe power management features. I suspect this lack of support in this early version is why my drivers EVT_WDF_DEVICE_DO_ENTRY method is not being called. The add device is called (where I'm looking at PCI config data) and Prepare hardware is called (where I'm configuring the FPGA's BAR and etc) - but no D0 entry. Could this lack of Power Support cause the the D0 state from not being entered? Can I artificially inject ( as a temporary measure ) to force the driver to attain D0 state so it can run? Currently my driver calls release hardware right after it calls prepare hardware with no intervening D0 Entry callback called. Is there a way I can opt out of power handling entirely and 'run' the driver?

Thanks for any ideas and guidance . .

Mark

Comments

  • Doron_HolanDoron_Holan Posts: 10,353
    Are you returning success from preparehardware? The first d0 entry is called by the framework immediately after preparehw so returning failure after it is the most likely cause. You can run !wdfkd.wdflogdump (your driver name) and see what happens

    d

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@markfsanderson.net
    Sent: Thursday, November 16, 2017 3:23:53 PM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Transition to D0?

    Greetings,
    I'm working on an driver for a custom FPGA PCIe card. This card is an early version, and reportedly does not support PCIe power management features. I suspect this lack of support in this early version is why my drivers EVT_WDF_DEVICE_DO_ENTRY method is not being called. The add device is called (where I'm looking at PCI config data) and Prepare hardware is called (where I'm configuring the FPGA's BAR and etc) - but no D0 entry. Could this lack of Power Support cause the the D0 state from not being entered? Can I artificially inject ( as a temporary measure ) to force the driver to attain D0 state so it can run? Currently my driver calls release hardware right after it calls prepare hardware with no intervening D0 Entry callback called. Is there a way I can opt out of power handling entirely and 'run' the driver?

    Thanks for any ideas and guidance . .

    Mark

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Doran,
    Duh - oops - this is embarrassing. You were spot on, for some reason I missed the fact I was returning STATUS_UNSUCCESSFUL constant at the bottom of my prepare hardware callback. Now its returning the correct generated status, which in most cases is STATUS_SUCCESS. It's working just fine now . . . Thanks again for the quick assist! The problem was sitting right there in front of me!

    Mark
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!