NdisReadEisaSlotInformation

VOID
   NdisReadEisaSlotInformation(

       OUT PNDIS_STATUS Status,
       IN NDIS_HANDLE WrapperConfigurationContext,
       OUT PUINT SlotNumber,
       OUT PNDIS_EISA_FUNCTION_INFORMATION EisaData
       );

NdisReadEisaSlotInformation returns EISA configuration information for a NIC on an EISA bus.

Parameters

Status

Points to a caller-supplied variable in which this function returns the status of the call as one of the following:

NDIS_STATUS_SUCCESS

The NIC driver can examine the buffered configuration data to determine whether a NIC that it supports has been found and, if so, can use the bus-relative configuration values as parameters to certain NdisXxx initialization functions.

NDIS_STATUS_RESOURCES

NDIS could not allocate the resources it needs to collect the EISA configuration information.

NDIS_STATUS_FAILURE

This is a default status, returned if no NIC can be found on an EISA bus or if the caller supplied an invalid parameter. For example, if the caller set the AdapterType to something other than NdisInterfaceEisa when it called NdisMSetAttributes(Ex), NdisReadEisaSlotInformation returns this status.

WrapperConfigurationContext

Specifies the handle input to MiniportInitialize.

SlotNumber

Points to a variable in which this function returns the slot number of a NIC found on the EISA bus if this call is successful.

EisaData

Points to a caller-allocated buffer, which must be at least sizeof(NDIS_EISA_SLOT_INFORMATION + NDIS_EISA_FUNCTION_INFORMATION).

Comments

NdisReadEisaSlotInformation reads standard EISA bus configuration information for a NIC that it finds on an EISA I/O bus and copies the bus-relative configuration information into a buffer.

If the call to NdisReadEisaSlotInformation succeeds, this function returns information in the caller-supplied buffer at EisaData, formatted as an NDIS_EISA_SLOT_INFORMATION structure followed by an NDIS_EISA_FUNCTION_INFORMATION structure.

The NDIS_EISA_SLOT_INFORMATION structure is defined as follows:

typedef struct _NDIS_EISA_SLOT_INFORMATION {

    UCHAR ReturnCode;

    UCHAR ReturnFlags;

    UCHAR MajorRevision;

    UCHAR MinorRevision;

    USHORT Checksum;

    UCHAR NumberFunctions;

    UCHAR FunctionInformation;

    ULONG CompressedId;

} NDIS_EISA_SLOT_INFORMATION, *NDIS_EISA_SLOT_INFORMATION;

     

Members of interest to NIC drivers include the following:

Member Meaning
Checksum The checksum value allows validation of the configuration data.
NumberFunctions The number of functions at this slot. 
FunctionInformation Whether NDIS_EISA_FUNCTION_INFORMATION is available for this slot.
CompressedId The EISA compressed identification of the device at this slot. 

The caller of NdisReadEisaSlotInformation can use the CompressedId value to confirm whether the NIC at this slot is its own. At most, NdisReadEisaSlotInformation retrieves the function information for the initial function. A NIC driver can call NdisReadEisaSlotInformationEx to retrieve the EISA configuration information for additional functions, if any.

The NDIS_EISA_FUNCTION_INFORMATION structure is defined as follows:

typedef struct _NDIS_EISA_FUNCTION_INFORMATION {

    ULONG CompressedId;

    UCHAR IdSlotFlags1;

    UCHAR IdSlotFlags2;

    UCHAR MinorRevision;

    UCHAR MajorRevision;

    UCHAR Selections[26];

    UCHAR FunctionFlags;

    UCHAR TypeString[80];

    EISA_MEMORY_CONFIGURATION EisaMemory[9];

    EISA_IRQ_CONFIGURATION EisaIrq[7];

    EISA_DMA_CONFIGURATION EisaDma[4];

    EISA_PORT_CONFIGURATION EisaPort[60];

    UCHAR InitializationData[60];

} NDIS_EISA_FUNCTION_INFORMATION, *PNDIS_EISA_FUNCTION_INFORMATION;

    

The members of this structure correspond to the standard EISA configuration function block, as follows:

Member Meaning
CompressedId Specifies the EISA compressed identification for the device. This value is identical to that of the CompressedId in the returned NDIS_EISA_SLOT_INFORMATION structure.
IdSlotFlags1 Specifies byte 0 identifier and slot information.
IdSlotFlags2 Specifies byte 1 identifier and slot information.
MinorRevision Specifies the .cfg file minor revision level.
MajorRevision Specifies the .cfg file major revision level.
Selections[26] Specifies an array for 26 selections.
FunctionFlags Specifies function flags.
TypeString[80] Specifies an array for a type and subtype ASCII string.
EisaMemory[9] Specifies an array in which each element is an EISA_MEMORY_CONFIGURATION structure, defining the bus-relative device memory range.
EisaIrq[7] Specifies an array in which each element is an EISA_IRQ_CONFIGURATION structure, defining the bus-relative device interrupt.
EisaDma[4] Specifies an array in which each element is an EISA_DMA_CONFIGURATION structure, defining the bus-relative DMA capacity, timing, and channel number, if any.
EisaPort[60] Specifies an array in which each element is an EISA_PORT_CONFIGURATION structure, defining the bus-relative I/O port ranges of the device.
InitializationData[60] Specifies an array of EISA initialization data.

NIC drivers call NdisReadEisaSlotInformation to identify their respective adapters in the current platform. When a particular driver’s NIC is found, the bus-relative configuration parameters returned at EisaData are passed in subsequent calls to functions such as NdisMRegisterInterrupt (EisaIrq), NdisMMapIoSpace (EisaMemory), and NdisMRegisterIoPortRange (EisaPort).

After consuming the returned information, the caller of NdisReadEisaSlotInformation is responsible for releasing the memory allocated at EisaData.

Callers of NdisReadEisaSlotInformation run at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisFreeMemory, NdisMMapIoSpace, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenConfiguration, NdisReadEisaSlotInformationEx