As mentioned in the preceding section, a SCSI miniport’s DriverEntry routine must request that the port driver allocate memory for SRB extensions if the miniport maintains per-request state information.
Otherwise, a SCSI miniport driver can write values into SRBs only for the following purposes and only in the following members:
·To return required status about each operation in the SrbStatus and ScsiStatus members
·If an underrun occurs, to update the DataTransferLength member
·If it supports auto request sense and transfers request-sense information, to update the SenseInfoBufferLength
·If SRB_FLAGS_UNSPECIFIED_DIRECTION is set in the SrbFlags member and the HBA is a slave DMA device, to reset the SRB_FLAGS_DATA_IN or SRB_FLAGS_DATA_OUT, as appropriate to the current transfer request