NdisImmediateWritePciSlotInformation

ULONG
NdisImmediateWritePciSlotInformation(
IN NDIS_HANDLE
WrapperConfigurationContext,
IN ULONG SlotNumber,
IN ULONG Offset,
IN PVOID Buffer,
IN ULONG Length
);

NdisImmediateWritePciSlotInformation writes PCI configuration information from a caller-supplied buffer to a specified range in the PCI configuration space for the NIC.

Parameters

WrapperConfigurationContext

Specifies the handle passed to the caller's MiniportInitialize function.

SlotNumber

Specifies the slot number of the NIC on the I/O bus.

Offset

Specifies the byte offset within the PCI configuration space at which to begin transferring the caller-supplied configuration information.

Buffer

Points to a caller-allocated buffer containing the PCI configuration information to be written.

Length

Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of PCI configuration information to write.

Return Value

NdisImmediateWritePciSlotInformation returns the number of bytes written.

Comments

NdisImmediateWritePciSlotInformation writes PCI configuration information for a NIC. However, drivers of NICs on PCI buses call NdisImmediateReadPciSlotInformation, NdisReadPciSlotInformation, or NdisMPciAssignResources far more frequently than this function. NdisImmediateWritePciSlotInformation cannot be called after the driver has claimed hardware resources in the registery for its NIC with NdisMPciAssignResources.

NdisImmediateWritePciSlotInformation transfers the same type of bus-relative PCI configuration information as NdisWritePciSlotInformation. However, callers of NdisWritePciSlotInformation pass the adapter handle, rather than the WrapperConfigurationContext handle that is valid only during NIC driver initialization.

Callers of NdisImmediateWritePciSlotInformation can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisImmediateReadPciSlotInformation, NdisMPciAssignResources, NdisWritePciSlotInformation