Previous Next

NdisMDeregisterIoPortRange

NdisMDeregisterIoPortRange releases a mapping that was set up with NdisMRegisterIoPortRange during driver initialization.

VOID 
  NdisMDeregisterIoPortRange(
    IN NDIS_HANDLE  MiniportAdapterHandle,
    IN UINT  InitialPort,
    IN UINT  NumberOfPorts,
    IN PVOID  PortOffset
    );

Parameters

MiniportAdapterHandle
Specifies the handle input to MiniportInitialize.
InitialPort
Specifies the bus-relative address of the first port in the range of ports.
NumberOfPorts
Specifies the number of ports in the range.
PortOffset
Specifies the mapped base port address returned by NdisMRegisterIoPortRange.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

The miniport driver must pass the same InitialPort and NumberOfPorts to NdisMDeregisterIoPortRange that were passed when MiniportInitialize called NdisMRegisterIoPortRange to get the mapped PortOffset value. That is, a miniport driver cannot call NdisMDeregisterIoPortRange to release a subrange of a mapped port range.

NdisMDeregisterIoPortRange can be called from the MiniportInitialize or MiniportHalt functions only if MiniportInitialize previously made a successful call to NdisMRegisterIoPortRange.

NdisMDeregisterIoPortRange also releases the driver’s claim on the I/O port range in the registry.

After it calls NdisMRegisterIoPortRange, the miniport driver can no longer access the NIC’s port range with calls to the NdisRaw..PortXxx functions.

Callers of NdisMDeregisterIoPortRange run at IRQL = PASSIVE_LEVEL.

See Also

MiniportHalt, MiniportInitialize, NdisMRegisterIoPortRange