Storport Driver Miniport Routines

A miniport driver that works with the Storport driver must contain implementations of the routine descriptions listed in this section, and it must expose them through an HW_INITIALIZATION_DATA structure during the miniport driver's initialization phase.

The Storport miniport driver routines are in most respects equivalent to their SCSI port counterparts (see SCSI Miniport Driver Routines for more information). However, there are important differences between the design of the SCSI port driver and that of the Storport driver, and these routines must accommodate those differences.

For instance, miniport drivers that work with the Storport driver must always be prepared to receive another I/O request after the HwStorStartIo routine has completed. A miniport driver that works with SCSI port is not required to do this. The SCSI port version does not receive a new I/O request until it explicitly signals the port driver, using the StorPortNotification function, that it is prepared to handle another request.

If the Storport version of the miniport driver cannot handle a request at the time it is submitted, it has a set of queue management functions, not available to the SCSI port version, that allow it to deal with the overload. Like the SCSI port version, the Storport version of the miniport driver completes the request with SRB_STATUS_BUSY, but unlike the SCSI port version, it can also mark the device queue as busy using the StorPortDeviceBusy routine. Similar functions allow the miniport driver to pause and resume processing on an adapter-wide basis.

For more information about the support routines provided by the Storport driver, see Storport Driver Support Routines.

For more information about the Storport driver, see Storage Port Drivers.

This section describes the following miniport driver routines:

In this section

TopicDescription

HwMSInterruptRoutine

The HwMSInterruptRoutine routine handles a message signaled interrupt (MSI).

HwStorAdapterControl

A miniport driver's HwStorAdapterControl routine is called to perform synchronous operations to control the state or behavior of an adapter, such as stopping or restarting the HBA for power management.

HwStorBuildIo

The HwStorBuildIo routine processes the SRB with unsynchronized access to shared system data structures before passing it to HwStorStartIo.

HwStorDpcRoutine

The HwStorDpcRoutine routine is a routine that is deferred for execution at DISPATCH IRQL by means of the deferred procedure call (DPC) mechanism.

HwStorFindAdapter

The HwStorFindAdapter routine uses the supplied configuration to determine whether a specific HBA is supported and, if it is, to return configuration information about that adapter.

HwStorInitialize

The HwStorInitialize routine initializes the miniport driver after a system reboot or power failure occurs. It is called by StorPort after HwStorFindAdapter successfully returns. HwStorInitialize initializes the HBA and finds all devices that are of interest to the miniport driver.

HwStorInterrupt

The Storport driver calls the HwStorInterrupt routine after the HBA generates an interrupt request.

HwStorPassiveInitializeRoutine

The HwStorPassiveInitializeRoutine callback routine is called after the HwStorInitialize routine when the current IRQL is at PASSIVE_LEVEL. The HwStorPassiveInitializeRoutine callback is set by calling the StorPortEnablePassiveInitialization routine. Initializing of the miniport's deferred procedure calls (DPCs) occurs in the HwStorPassiveInitializeRoutine callback.

HwStorResetBus

The HwStorResetBus routine is called by the port driver to clear error conditions.

HwStorStartIo

The Storport driver calls the HwStorStartIo routine one time for each incoming I/O request.

HwStorStateChange

A miniport-provided callback that is called after a notification from StorPortStateChangeDetected is processed.

HwStorTimer

The HwStorTimer routine is called after the interval that is specified when the miniport driver called StorPortNotification with the RequestTimerCall NotificationType value.

HwStorTracingEnabled

The HwStorTracingEnabled callback routine enables the Storport to notify a miniport that event tracing is enabled.

HwStorUnitControl

A miniport driver's HwStorUnitControl routine is called to perform synchronous operations to control the state of storage unit device. The miniport driver is notified to start a unit or handle a power state transition for a unit device.

HwStorWmiExecuteMethod

A miniport driver's HwStorWmiExecuteMethod routine is called to execute a method associated with a data block.

HwStorWmiFunctionControl

A miniport driver's HwStorWmiFunctionControl routine is called to enable or disable notification of events, or to enable or disable data collection for data blocks that the miniport driver designated as expensive to collect.

HwStorWmiQueryDataBlock

A miniport driver's HwStorWmiQueryDataBlock routine is called to obtain either a single instance or all instances of a data block.

HwStorWmiQueryReginfo

A miniport driver's HwStorWmiQueryReginfo routine is called to obtain information about the data and event blocks to be registered on behalf of the miniport driver by the SCSI port driver.

HwStorWmiSetDataBlock

A miniport driver's HwStorWmiSetDataBlock routine is called to change all data items in a single instance of a data block.

HwStorWmiSetDataItem

A miniport driver's HwStorWmiSetDataItem routine is called to change a single data item in an instance of a data block.

HwStorWorkItem

A miniport-provided callback function for processing a Storport work item request.

 

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft