DriverEntry of SCSI Miniport Driver routine

Each miniport driver must have a routine explicitly named DriverEntry in order to be loaded.

Note  The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
 

Syntax


ULONG DriverEntry(
  _In_ PVOID Argument1,
  _In_ PVOID Argument2
);

Parameters

Argument1 [in]

Is a pointer with which the miniport driver must call ScsiPortInitialize.

Argument2 [in]

Is a pointer with which the miniport driver must call ScsiPortInitialize.

Return value

DriverEntry returns the value returned by ScsiPortInitialize. If it calls ScsiPortInitialize more than once, DriverEntry returns the lowest value returned by ScsiPortInitialize.

Remarks

A miniport driver's DriverEntry routine allocates memory on the stack and initializes a HW_INITIALIZATION_DATA structure with zeros. DriverEntry must zero all members in the HW_INITIALIZATION_DATA structure before initializing it with values appropriate to the HBA(s) the miniport driver supports.

DriverEntry should set the HwInitializationDataSize member to sizeof(HW_INITIALIZATION_DATA) to indicate which version of this structure it is using, as well as initializing all members appropriately for its HBA(s).

Next, DriverEntry calls ScsiPortInitialize. If a miniport driver supports HBA(s) that can be connected on more than one type of I/O bus, such as both MicroChannel and Isa type buses, it should call ScsiPortInitialize once for each type of I/O bus. Such a miniport driver must return the lowest value returned by its calls to ScsiPortInitialize from the DriverEntry routine. A miniport driver writer can make no assumptions about the values returned by ScsiPortInitialize.

See also

HW_INITIALIZATION_DATA
HwScsiFindAdapter
ScsiPortInitialize

 

 

Send comments about this topic to Microsoft

Show: