Partager via


HwScsiStartIo routine

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.

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

BOOLEAN HwScsiStartIo(
  _In_ PVOID               DeviceExtension,
  _In_ PSCSI_REQUEST_BLOCK Srb
);

Parameters

  • DeviceExtension [in]
    Points to the miniport driver's per-HBA storage area.

  • Srb [in]
    Points to the SCSI request block to be started.

Return value

HwScsiStartIo returns TRUE to acknowledge receipt of the SRB.

Remarks

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:

  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.

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.

Requirements

Target platform

Desktop

Header

Miniport.h (include Scsi.h)

See also

ScsiPortCompleteRequest

ScsiPortNotification

SCSI_REQUEST_BLOCK

 

 

Send comments about this topic to Microsoft