The StorPortSetDeviceQueueDepth routine sets the maximum depth of the device queue for the indicated device.
STORPORT_API BOOLEAN StorPortSetDeviceQueueDepth( _In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG Depth );
- HwDeviceExtension [in]
A pointer to the miniport driver's per-HBA storage area.
- PathId [in]
Contains the path ID of the target device.
- TargetId [in]
Contains the device number of the target device.
- Lun [in]
Contains the logical unit number of the target device.
- Depth [in]
Supplies the depth to which the queue is to be set. This value is always > 0.
StorPortSetDeviceQueueDepth returns TRUE if the queue depth was successfully set, or FALSE if the operation failed.
Before the first call to StorPortSetDeviceQueueDepth, the device queue depth is set to the default value. The following conditional description determines the default queue depth.
- If the InitialQueueDepth member of the PORT_CONFIGURATION_INFORMATION structure is non-zero, the default depth will be the value of InitialQueueDepth.
- Otherwise, if the MaxIOsPerLun member of the PORT_CONFIGURATION_INFORMATION structure is non-zero, the default depth will be the value of MaxIOsPerLun.
- Otherwise, the default depth is 250 for virtual miniports and 20 for physical miniports. Unless a device supports extended SRBs, the maximum queue depth is 255.
The StorPortSetDeviceQueueDepth routine should be called when the miniport driver receives the first SCSI Inquiry command for the specified LUN, or at any time thereafter (but not before), as long as the LUN is valid.
Build date: 11/16/2013