ULONG
ScsiPortInitialize(
IN PVOID Argument1,
IN PVOID Argument2,
IN struct _HW_INITIALIZATION_DATA *HwInitializationData,
IN PVOID HwContext /* optional */
);
ScsiPortInitialize sets up the PORT_CONFIGURATION_INFORMATION structure and calls a miniport driver’s HwScsiFindAdapter routine. ScsiPortInitialize also sets up system objects and resources on behalf of miniport drivers.
ScsiPortInitialize returns a status value that is used as the return value from the miniport’s DriverEntry routine.
Every miniport driver’s DriverEntry routine must call ScsiPortInitialize after the miniport has first zeroed and then set up the HW_INITIALIZATION_DATA.
If a miniport driver can support HBAs on different types of I/O buses, such as both Isa and MicroChannel type I/O buses, the miniport should call ScsiPortInitialize for each supported interface type.
A miniport driver that calls ScsiPortInitialize more than once should check the value returned by ScsiPortInitialize at each call and save the lowest value for all its calls. The DriverEntry routine must return the lowest value when it returns control to the system. Miniport driver writers can make no assumptions about the values returned by ScsiPortInitialize.