A.4.3.5 Return from HwScsiFindAdapter to ScsiPortInitialize
When a miniport driver’s HwScsiFindAdapter routine returns control, ScsiPortInitialize returns to the DriverEntry routine if the call(s) to HwScsiFindAdapter indicated that the miniport driver could not support an HBA. Otherwise, ScsiPortInitialize claims resources in the registry, sets up necessary system resources, such as NT interrupt and adapter objects, on behalf of the miniport driver. Then, it calls the miniport’s HwScsiInitialize routine, described in Section A.4.4.
In addition to the values it sets in the PORT_CONFIGURATION_INFORMATION buffer, ScsiPortInitialize also checks the registry for user-set values that disable any or all of the following:
·Synchronous transfers on the HBA
The port driver ORs the default SrbFlags that it maintains for the HBA with SRB_FLAGS_DISABLE_SYNCH_TRANSFER.
·Bus-disconnect operations on the HBA
The port driver ORs the default SrbFlags with SRB_FLAGS_DISABLE_DISCONNECT.
·Tagged queueing
The port driver sets the TaggedQueuing Boolean that it maintains for the HBA to FALSE.
·Internal queueing of requests on the HBA
The port driver sets the MultipleRequestPerLu Boolean that it maintains about the HBA to FALSE.
If any of the immediately preceding “disable” values are in the registry, it overrides whatever the HwScsiFindAdapter routine sets in the PORT_CONFIGURATION_INFORMATION buffer. Note that temporarily disabling synchronous transfers, bus-disconnect operations, tagged queueing, and HBA internal request queueing can simplify using a debugger to trace request handling in a miniport driver that is under development.
Note also that the Windows NT port driver uses the PORT_CONFIGURATION_INFORMATION values provided by a miniport’s HwScsiFindAdapter routine and/or in the registry to fill in the IO_SCSI_CAPABILITIES data for use by SCSI class drivers, as described in Section A.1.3.3.