HwScsiStartIo

BOOLEAN
    HwScsiStartIo(

        IN PVOID  DeviceExtension,
        IN PSCSI_REQUEST_BLOCK  Srb
        );

All miniport drivers must have a HwScsiStartIo routine. The OS-specific port driver calls HwScsiStartIo first with each incoming I/O request for a target on a SCSI bus.

Parameters

DeviceExtension
Points to the miniport driver’s per-HBA storage area.
Srb
Points to the SCSI request block to be started.

Return Value

HwScsiStartIo returns TRUE to acknowledge receipt of the SRB.

Comments

As soon as it receives the initial request for a target peripheral, the OS-specific port driver calls the HwScsiStartIo routine with an input SRB. After this call, the HBA miniport driver owns the request and is expected to complete it.

Subsequently, the OS-specific port driver calls the HwScsiStartIo routine after the port driver receives each NextRequest, NextLuRequest, or notification as the miniport driver makes calls to ScsiPortNotification and/or ScsiPortCompleteRequest.

When the HwScsiStartIo routine is called but the driver needs to defer processing of the given SRB, HwScsiStartIo should do the following:

  1. Set the SrbStatus member to SRB_STATUS_BUSY.

  2. Call ScsiPortNotification with the request to be deferred and a notification type of RequestComplete.

  3. Return TRUE.

The port driver requeues such a request and resubmits it later.

See Also

ScsiPortCompleteRequest, ScsiPortNotification, SCSI_REQUEST_BLOCK