Bewerken

Delen via


ScsiPortIoMapTransfer function (srb.h)

The ScsiPortIoMapTransfer routine sets up the system DMA controller for a miniport driver to transfer data through a subordinate HBA.

Note  The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
 

Syntax

SCSIPORT_API VOID ScsiPortIoMapTransfer(
  [in] PVOID               HwDeviceExtension,
  [in] PSCSI_REQUEST_BLOCK Srb,
  [in] PVOID               LogicalAddress,
  [in] ULONG               Length
);

Parameters

[in] HwDeviceExtension

Pointer to the hardware device extension. This is a per-HBA storage area that the port driver allocates and initializes on behalf of the miniport driver. Miniport drivers usually store HBA-specific information in this extension, such as the state of the HBA and the HBA's mapped access ranges. This area is available to the miniport driver in the DeviceExtension->HwDeviceExtension member of the HBA's device object immediately after the miniport driver calls ScsiPortInitialize. The port driver frees this memory when it removes the device.

[in] Srb

Pointer to the SCSI request block for the DMA transfer.

[in] LogicalAddress

Specifies the starting address for the transfer operation. This value can be the base address of a buffer into which or from which data is to be transferred. This value can be an offset within such a buffer.

[in] Length

Specifies the number of bytes to be transferred.

Return value

None

Remarks

Only miniport drivers of HBAs that use a system DMA controller (subordinate DMA) call ScsiPortIoMapTransfer. This routine must be called before such a miniport driver sets up its HBA to transfer data. The range specified by the LogicalAddress and Length must be within the buffer described by the given SRB.

After the operating system-specific port driver programs the system DMA controller, it calls the miniport driver's HwScsiDmaStarted routine. HwScsiDmaStarted should program the HBA to begin the data transfer. Note that an HBA can interrupt between the miniport driver's call to ScsiPortIoMapTransfer and the operating system-specific port driver's call to the miniport driver's HwScsiDmaStarted routine.

Requirements

Requirement Value
Target Platform Desktop
Header srb.h (include Miniport.h, Scsi.h)
Library Scsiport.lib

See also

HwScsiDmaStarted

ScsiPortFlushDma