Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After the higher-level storage class drivers have loaded, most of the SRBs sent to the HwScsiStartIo routine have the Function member set to SRB_FUNCTION_EXECUTE_SCSI.
On receipt of an SRB_FUNCTION_EXECUTE_SCSI request, a miniport driver's HwScsiStartIo routine does the following:
Gets and/or sets up whatever context the miniport driver maintains in its device, logical unit, and/or SRB extensions
For example, a miniport driver might set up a logical unit extension with pointers to the SRB itself and the SRB DataBuffer pointer, the SRB DataTransferLength value, and a driver-defined value (or CDB SCSIOP_XXX value) indicating the operation to be carried out on the HBA.
Calls an internal routine to program the HBA, as partially directed by the SrbFlags, for the requested operation
For a device I/O operation, such an internal routine generally selects the target device and sends the CDB over the bus to the target logical unit.
If the miniport driver uses system DMA, it must call ScsiPortIoMapTransferbefore programming the HBA to transfer data. ScsiPortIoMapTransfer sets up the system DMA controller and calls the miniport driver's HwScsiDmaStarted routine, described later in SCSI Miniport Driver's HwScsiDmaStarted Routine.
All system-defined, required device I/O control requests sent to NT-based operating system storage class drivers are mapped to SRBs with the Function member set to SRB_FUNCTION_EXECUTE_SCSI.