Delay in storage Miniport

Hi,

I need to wait in our HwInitialize routine for some time.
KeDelayExecutionThread would have been ideal (I need to wait only in normal mode) but it is banned in Storport miniports.
About StorPortStallExecution, does it stall all storport operations, or does it stall the processor itself?
Is there any other call that is available that I am missing? Thanks.

Regards,
Suresh

I tried using StorPortRequestTimer call to delay (and carry out the remaining processing in the Timer callback), but the timer callback happens at DISPATCH level.
Is there no other way where I can wait at PASSIVE level in StorPort?

Regards,
Suresh

Does StorPortEnablePassiveInitialization API help to perform the remainder of your initialization?

It can. It depends on whether some of your initialization needs to be done
at PASSIVE_LEVEL.

On Thu, Dec 8, 2016 at 5:54 PM wrote:

> Does StorPortEnablePassiveInitialization API help to perform the remainder
> of your initialization?
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

Thanks for the tips about using StorPortEnablePassiveInitialization.
However my problem is that even in the corresponding HwStorPassiveInitializeRoutine routine I (may) need to wait (for my FW to respond).
With the KeDelayExecutionThread not being available for use, how do I achieve such wait in my miniport?

Regards,
Suresh

With the KeDelayExecutionThread not being available for use, how do I achieve
<< such wait in my miniport?

Does your firmware not generate an interrupt upon its completion? That way you don’t have to wait. If not interrupts, can you try poling for the firmware completion in the timer routine?

Thanks Girish. Yes, checking in timer callback and then re-scheduling the timer again if FW is not ready seems to be the only solution.

The WDK 7.1 ISO image contains samples so you may have to run the WDK setup program again to have these samples installed.

You should then add the folder containing the samples to the list of indexed folders so you can search this folder for what you need rapidly from within the Explorer search bar.

https://www.microsoft.com/en-us/download/details.aspx?id=11800