StorPortPutScatterGatherList function (storport.h)
The StorPortPutScatterGatherList routine releases any resources associated with a scatter/gather list that was previously created by a call to the StorPortBuildScatterGatherList routine.
Syntax
ULONG StorPortPutScatterGatherList(
[in] PVOID HwDeviceExtension,
[in] PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
[in] BOOLEAN WriteToDevice
);
Parameters
[in] HwDeviceExtension
A pointer to the hardware device extension for the host bus adapter (HBA).
[in] ScatterGatherList
A pointer to a buffer that contains a scatter/gather list that was previously created by a call to the StorPortBuildScatterGatherList routine.
[in] WriteToDevice
A value that indicates the direction of the DMA transfer that has completed. A value of TRUE indicates a transfer from the data buffer to the device, and FALSE indicates a transfer from the device to the data buffer.
Return value
StorPortPutScatterGatherList returns one of the following status codes:
Return code | Description |
---|---|
|
This function is not implemented on the active operating system. |
|
Indicates that the routine released the scatter/gather list successfully. |
|
The HwDeviceExtension that was passed was NULL. |
|
The call was made at an invalid IRQL. |
Remarks
The StorPortPutScatterGatherList routine does not free the buffer memory for the scatter/gather list, because the miniport driver allocated this memory.
After the StorPortPutScatterGatherList routine returns, the miniport driver can reuse the buffer to create a new scatter/gather list by calling the StorPortBuildScatterGatherList again. If a miniport driver has finished using the buffer for the scatter/gather list, it should free the memory for the buffer after the StorPortPutScatterGatherList routine returns. If the miniport driver allocates the buffer memory with the StorPortAllocatePool routine, it should free the memory by calling the StorPortFreePool routine.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | storport.h (include Storport.h) |
IRQL | DISPATCH_LEVEL |
DDI compliance rules | StorPortIrql(storport) |