NPAB_Get_Card_Config_Info

Retrieves and returns configuration information for bus architectures that keep this information on a per slot basis.

Thread Context:Blocking

Syntax

    LONG NPAB_Get_Card_Config_Info (
       LONG   npaHandle,
       LONG   busTag,
       LONG   uniqueID,
       LONG   size,
       LONG   parameter0,
       LONG   parameter1,
       void  *configInfo
       );
    
    

Parameters

npaHandle
(IN) The HAM's handle for using the NPA APIs, assigned during NPA_Register_HAM_Module.
busTag
(IN) A value returned by NPAB_Search_Adapter or by parsing the Product ID option of the NPAOptionStruct. This value specifies the bus on which the operation is to be performed.
uniqueID
(IN) A value returned by NPAB_Search_Adapter, NPAB_Get_Instance_Number_Mapping, or NPAB_Get_Unique_Identifier that uniquely identifies a specific device or function.
size
(IN) Specifies the number of bytes to be returned into the configuration buffer. For PCI, at most 0x40 is guaranteed.
parameter0
(IN) Bus architecture-dependent values that further specify what information is to be returned.
parameter1
(IN) Bus architecture-dependent values that further specify what information is to be returned.
configInfo
(OUT) Points to a bus architecture-dependent structure used to receive the returned information. The caller needs to be sure that the buffer is at least size bytes long.

Return Values

The following table lists return values and descriptions.

0

The requested operation was completed successfully.

4

One of the parameters was invalid.

5

busTag denotes a bus type for which the slot has no configuration information.

6

The uniqueID input parameter has no card present.

8

NBI failed.

9

NBI bus specific error.

Remarks

Call NPAB_Get_Card_Config_Info only if the busTag that identifies a bus has configuration information for the bus on a per slot basis.

It is the caller's responsibility to know how much and what sort of information is returned, so that configInfo is set pointing to a sufficiently large space and the resulting information can be interpreted.

Both parameter0 and parameter1 are defined on a per bus architecture basis. Their meanings must be the same on all implementations of a particular bus but vary from one bus to another. One or both of these parameters can be unused; and if unused, should be set to 0.

The following are the parameter values for the specified bus type:

EISA Bus

Parameter

Value

Size

320

parameter0

EISA configuration block number

parameter1

n/a

configInfo

Filled with EISA configuration information for the specified uniqueID. For a definition of the information returned, see the EISA Specification.

MCA Bus

Parameter

Value

Size

8

parameter0

n/a

parameter1

n/a

configInfo

Filled with I/O port values from POS0 - POS7 (100h - 107h) for the specified uniqueID. For a definition of the information returned, see Personal System/2 Hardware Technical Reference.

PCI Bus

Parameter

Value

Size

256

parameter0

n/a

parameter1

n/a

configInfo

Filled in with PCI configuration information for the specified uniqueID. For a definition of the return information, see PCI Local Bus Specification.

PC Card Bus (PCMCIA)

Parameter

Value

Size

Large enough to contain the information returned by the PC Card GetConfigurationInfo API plus the memory attribute.

parameter0

Size of the block returned by the PC Card GetConfigurationInfo API.

parameter1

n/a

configInfo

Filled with the PCMCIA configuration information for the specified uniqueID. The information is the data returned by the PC Card GetConfigurationInfo API and as much of the attribute memory as there is buffer space for. For a definition of the information returned, see PCMCIA Standards.

CardBus Bus

Parameter

Value

Size

The size of the buffer needed to contain the information specified by parameter0, parameter1, and the desired quantity of CIS memory.

parameter0

The size of the information requested form the Card Services API, GetConfigurationInfo. The valid values are 37 or 42. If this call returns ODI_NBI_PARAMETER_ERROR, it might be because 42 bytes were requested, but the version of Card Services supports only 37 bytes.

parameter1

The order and type of information to be returned in the configInfo buffer. The following values are valid for parameter1.

 

ODI_DEFAULT_INFO The configInfo buffer contains the following default information:

  • 37 or 42 bytes of information returned by Card Services API, GetConfigurationInfo.
  • Attribute memory space equal to the amount of space remaining in the configInfo buffer.

 

ODI_IO_MEMORY_WINDOWS

If the size of the information returned by the Card Services API, GetConfigurationInfo, is 42 bytes, the configInfo buffer contains the following:

  • The 42 bytes of information returned by the Cad Services API, GetConfigurationInfo.
  • If there are I/O windows or memory windows, the window information is placed in the configInfo buffer as 18-byte blocks (one 18-byte block for each window). The first 13 bytes of information is returned by the card Services API, GetFirstWindow or GetNextWindow. For memory windows, the remaining 5 bytes of information is returned by the Card Services API, GetMemPage.For I/O windows, the remaining 5 bytes are zero.
  • Attribute memory space equal to the amount of space remaining in the configInfo buffer.

 

If the size of the information returned by the Card Services API, GetConfigurationInfo, is 37 bytes, the configInfo buffer contains the following:

  • The 37 bytes of information returned by the Card Services API, GetConfigurationInfo.
  • Attribute memory space equal to the amount of space remaining in the configInfo buffer.

configInfo

Contains the following:

  • The number of bytes specified by parameter0 of the information returned by the Card Services API, GetConfigurationInfo.
  • The number of bytes specified by parameter1 of PCI configuration space.
  • CIS memory space equal to the amount of space remaining in the configInfo buffer.

For a definition of the information returned, see PC Card Standards, February 1995 release and the PCI Local Bus Specification.

PnP ISA Bus

Parameter

Value

Size

469

parameter0

n/a

parameter1

n/a

configInfo

configInfo filled in with PnP ISA configuration information for the specified uniqueID. The definition of the information returned in the PNP_ISA_Config_Info structure.