none
Why does StorPortGetStartIoPerfParams always return 0 for MessageNumber? RRS feed

  • Question

  • Hi,
    I am implementing a Storport driver which supports MSIx. The driver works fine for supporting MSIX.

    For performance purpose, I tried to call StorPortGetStartIoPerfParams to get the OS suggested MessageNumber. The function returns STOR_STATUS_SUCCESS, but the message number is always zero.

    In HwInitialize routine, I have set the flags like the following, StorPortInitializePerfOpts returns successfully.

      PerfReturn = StorPortInitializePerfOpts(pDeviceExtension,TRUE,&PerfConfigData);
      PerfConfigData.Flags = PerfConfigData.Flags & ~STOR_PERF_INTERRUPT_MESSAGE_RANGES & ~STOR_PERF_CONCURRENT_CHANNELS & ~STOR_PERF_ADV_CONFIG_LOCALITY & ~STOR_PERF_DPC_REDIRECTION;
      PerfConfigData.Flags = PerfConfigData.Flags | STOR_PERF_DPC_REDIRECTION ;
      PerfConfigData.Flags = PerfConfigData.Flags | STOR_PERF_INTERRUPT_MESSAGE_RANGES;
      PerfConfigData.FirstRedirectionMessageNumber = 0;
      PerfConfigData.LastRedirectionMessageNumber = 6;
      PerfConfigData.Version =  STOR_PERF_VERSION;
      PerfReturn = StorPortInitializePerfOpts(pDeviceExtension,FALSE,&PerfConfigData); 

    Did I miss anything, or there are something more I need to take care for getting the right message number by calling StorPortGetStartIoPerfParams?

    Thanks,

    Jeff

    Wednesday, November 7, 2012 1:05 AM

Answers

  • Hi Donald,

    Thanks for your answers.

    I found a solution for this. By removing the following code, I can get OS suggested MessageNumber by calling StorPortGetStartIoPerfParams.

    /***

      PerfConfigData.Flags = PerfConfigData.Flags | STOR_PERF_INTERRUPT_MESSAGE_RANGES;
      PerfConfigData.FirstRedirectionMessageNumber = 0;
      PerfConfigData.LastRedirectionMessageNumber = 6;

    ***/

    But it raised another question, how to make the flag of "STOR_PERF_INTERRUPT_MESSAGE_RANGES" working? How can I define the range of message number?

    Thanks,

    Jeff


    Tuesday, April 16, 2013 8:34 PM

All replies

  • Well assuming the device and the system support MSI, it is possible that the system decided not to use MSI for your device.  A zero for the MessageNumber means that MSI is not being used.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Tuesday, November 13, 2012 6:12 PM
  • Check you device in the DeviceManager, if the IRQ under the resources for the device is not negative, the device is being mapped to a non-MSI interrupt.

     

    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Friday, November 16, 2012 6:50 PM
  • Hi Donald,

    Thanks for your answers.

    I found a solution for this. By removing the following code, I can get OS suggested MessageNumber by calling StorPortGetStartIoPerfParams.

    /***

      PerfConfigData.Flags = PerfConfigData.Flags | STOR_PERF_INTERRUPT_MESSAGE_RANGES;
      PerfConfigData.FirstRedirectionMessageNumber = 0;
      PerfConfigData.LastRedirectionMessageNumber = 6;

    ***/

    But it raised another question, how to make the flag of "STOR_PERF_INTERRUPT_MESSAGE_RANGES" working? How can I define the range of message number?

    Thanks,

    Jeff


    Tuesday, April 16, 2013 8:34 PM