A.4.5  SCSI Miniport Driver’s HwScsiStartIo Routine

As its name suggests, a HwScsiStartIo routine is the entry point for incoming requests to peripheral devices on the HBA-driven bus(es). HwScsiStartIo is called with pointers to a SCSI request block (SRB) and to the miniport’s device extension for per-HBA state.

If the miniport’s DriverEntry routine also requested that memory be allocated for logical unit extensions (see Section A.4.2.1), the HwScsiStartIo routine calls ScsiPortGetLogicalUnit with the input device extension pointer and the PathId, TargetId, and Lun values from the input SRB.

If the DriverEntry routine requested that memory be allocated for SRB extensions, the SrbExtension member in each SRB contains a pointer to the miniport’s per-request storage area. Note that a miniport driver must request that memory be allocated for SrbExtensions if it maintains per-request state information. It cannot use an SRB for this purpose.