Index Index for
Section 9
Index Alphabetical
listing for G
Bottom of page Bottom of
page

get_config(9r)

NAME

get_config - EISA/ISA: Returns configuration data assigned to an option card

SYNOPSIS

int get_config( struct controller *ctlr_p, uint_t config_item, char *func_type, void *data_p, int handle );

ARGUMENTS

ctlr_p Specifies a pointer to the controller structure associated with the option card. The get_config interface obtains the configuration data associated with this controller structure. config_item Specifies the kind of configuration data that you want to obtain for the option card. You can specify one of the following constants: __________________________________________________________ Value Meaning __________________________________________________________ RES_MEM Obtains bus memory characteristics. RES_IRQ Obtains interrupt channel characteristics assigned to the option card. RES_DMA Obtains the DMA channel assigned to the option card. RES_PORT Obtains the I/O port assignments for the option card. __________________________________________________________ func_type Specifies a bus-specific argument. ISA bus adapters do not use this argument. For the EISA bus, this argument specifies the function type string that appears in the option card's eisa_option structure. data_p Specifies a pointer to a structure appropriate for storing the requested data. The void * data type means that you cast the data_p argument's data type to the structure that stores the requested data. handle Specifies a handle returned by get_config if there is more configuration data of the type requested in the config_item argument. You must specify zero (0) on the first call to get_config. On subsequent calls to get_config for this configuration data type, you specify the value returned in the previous call to get_config.

DESCRIPTION

The get_config interface returns configuration data information assigned to an option card.

NOTES

The get_config interface is a generic interface that maps to a bus-specific interface that actually returns the assigned configuration data for the specified option card. Using this interface to obtain configuration information makes the driver more portable across bus architectures.

RETURN VALUES

If the bus option has only one resource of the requested config_item, get_config stores its value in the data_p argument and returns the value zero (0). If the bus option has multiple resources of the requested config_item, get_config stores the value at the top of the list in the data_p argument and returns a handle that points to the next element in the list. To obtain the next element in the list, call get_config again and pass the returned handle to the handle argument. After reading all of the elements in the list, get_config returns the value zero (0). If the bus option does not have a resource of the requested func_type, get_config returns the value -1.

SEE ALSO

Data Structures: controller(9s)

Index Index for
Section 9
Index Alphabetical
listing for G
Top of page Top of
page