Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Storage
Reference
Storage Routines
 ScsiPortInitialize
Windows Driver Kit: Storage Devices
ScsiPortInitialize

For a non-Plug and Play miniport driver, the ScsiPortInitialize routine sets up the PORT_CONFIGURATION_INFORMATION structure and calls the miniport driver's HwScsiFindAdapter routine. ScsiPortInitialize also sets up system objects and resources on behalf of miniport drivers. For a Plug and Play miniport driver, ScsiPortInitialize stores the miniport driver's initialization data for future use.

ULONG 
  ScsiPortInitialize(
    IN PVOID  Argument1,
    IN PVOID  Argument2,
    IN struct _HW_INITIALIZATION_DATA  *HwInitializationData,
    IN PVOID  HwContext  OPTIONAL
    );

Parameters

Argument1
Pointer to the driver object that the operating system passed to the miniport driver in the first argument of its DriverEntry routine.
Argument2
Pointer to some context information that the operating system passed to the miniport driver in the second argument of its DriverEntry.
HwInitializationData
Pointer to the initialization and configuration information supplied by DriverEntry.
HwContext
Specifies the address of a context value to be passed to the miniport driver's HwScsiFindAdapter routine. Only legacy miniport drivers that scan the bus for HBAs rather than receiving configuration information from the port driver can use this parameter to store state between calls to HwScsiFindAdapter.

Return Value

ScsiPortInitialize returns a status value that is used as the return value from the miniport driver's DriverEntry routine.

Comments

Every miniport driver's DriverEntry routine must call ScsiPortInitialize after the miniport driver 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 driver 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.

Requirements

Headers: Declared in srb.h. Include miniport.h and scsi.h.

See Also

DriverEntry of SCSI Miniport Driver, HW_INITIALIZATION_DATA (SCSI), HwScsiFindAdapter

APIScan Requirements

Header: Srb.h, Miniport.h, Scsi.h
Function: ScsiPortInitialize
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker