ScsiPortFreeDeviceBase function (srb.h)
The ScsiPortFreeDeviceBase routine frees a range of device I/O or memory space addresses previously mapped into the system address space with ScsiPortGetDeviceBase.
Syntax
SCSIPORT_API VOID ScsiPortFreeDeviceBase(
[in] PVOID HwDeviceExtension,
[in] PVOID MappedAddress
);
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] MappedAddress
Pointer to the base address of the range to be freed. This address must be the same as that returned by ScsiPortGetDeviceBase.
Return value
None
Remarks
If a miniport driver's HwScsiFindAdapter routine determines that the driver does not need a particular mapped base address for an adapter, it must release the mapping by calling this routine. For example, when a miniport driver determines there are no supported HBAs on a particular I/O bus, it must call ScsiPortFreeDeviceBase with each mapped address returned by ScsiPortGetDeviceBase, if any calls to this routine were made.
ScsiPortFreeDeviceBase can be called only from miniport driver's HwScsiFindAdapter routine. Calls from other miniport driver routines will result in system failure or incorrect operation for the caller.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | srb.h (include Miniport.h, Scsi.h) |
Library | Scsiport.lib |