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

Home NTDEV

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: https://www.osr.com/osr-learning-library/


FLR to a VF when the IOs are going on

ajitabhsajitabhs Member Posts: 74

Hi Guys,

I just have a question about the driver's behavior in case of a SRIOV device (with all the Virtual functions are identical). Lets say that there are IOs going on and a FLR is issued to a VF. My assumption is that the function driver will not even know that the reset occurred. The OS will

  1. issue the reset,
  2. unload the driver,
  3. claim all the pending commands in the driver
  4. Perform a PCIe level initialization of the function (mostly a VF is initialized using the SRIOV capabilities, so not much to do here)
  5. Reload the driver

I am not really sure about step 3 here. Will the driver need to participate in "aborting" the commands? can the driver register for a "reset notification" on FLR and abort perform all the commands there?

Appreciate any inputs here.

Thanks
-Aj

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,445

    Who is going to request a reset? A driver cannot be unloaded while it has pending requests. The system will have to do a clean shutdown of the driver, and as part of that shutdown, the driver will need to clean up whatever outstanding requests it has. Only then could the driver be unloaded.

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

  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,588

    The function driver could go through the surprise removal state transitions, ending in an unload, assuming that some entity actually resets the function, and that the reset results in a re-enumeration that in turn does not enumerate the function in question.

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 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online
Writing WDF Drivers 22 May 2023 Live, Online