/*++

    Copyright (c) Microsoft Corporation.  All rights reserved.

Rule Name:

    StorPortPassiveFromHwInit

Domain:

    storport

Rule ID:

    Not Applicable

Description:

    StorPortEnablePassiveInitialization should not be called within HW Initialization entry point when SP_HW_INITIALIZE is called directly for Storport driver.

Help Link:

    https://go.microsoft.com/fwlink/?LinkId=507239

--*/



#include "ntddk_slic.h"

state
{
   enum {init,insideHwInitialize} s = init;
}


fun_SP_HW_INITIALIZE.entry
{
    s = insideHwInitialize;
}


[StorPortEnablePassiveInitialization].entry
{
    if(s==insideHwInitialize)
    {
        abort "$fname should not be called within HW Initialization entry point when SP_HW_INITIALIZE is called directly for Storport driver.";
    }
}

fun_SP_HW_INITIALIZE.exit
{
    s = init;
}
