All miniport drivers must have a HwScsiStartIo routine. The operating system-specific port driver calls HwScsiStartIo first with each incoming I/O request for a target on a SCSI bus.
- DeviceExtension [in]
Points to the miniport driver's per-HBA storage area.
- Srb [in]
Points to the SCSI request block to be started.
HwScsiStartIo returns TRUE to acknowledge receipt of the SRB.
As soon as it receives the initial request for a target peripheral, the operating system-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 operating system-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:
Set the SrbStatus member to SRB_STATUS_BUSY.
Call ScsiPortNotification with the request to be deferred and a notification type of RequestComplete.
The port driver requeues such a request and resubmits it later.
The name HwScsiStartIo is just a placeholder. The actual prototype of this routine is defined in srb.h as follows:
typedef BOOLEAN (*PHW_STARTIO) ( IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb );
For more information about the HwScsiStartIo routine, see SCSI Miniport Driver's HwScsiStartIo Routine.