Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

csx_releaseconfiguration(9f) [sunos man page]

csx_ReleaseConfiguration(9F)				   Kernel Functions for Drivers 			      csx_ReleaseConfiguration(9F)

NAME
csx_ReleaseConfiguration - release PC Card and socket configuration SYNOPSIS
#include <sys/pccard.h> int32_t csx_ReleaseConfiguration(client_handle_t ch, release_config_t *rc); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). rc Pointer to a release_config_t structure. DESCRIPTION
This function returns a PC Card and socket to a simple memory only interface and sets the card to configuration zero by writing a 0 to the PC card's COR (Configuration Option Register). Card Services may remove power from the socket if no clients have indicated their usage of the socket by an active csx_RequestConfigura- tion(9F) or csx_RequestWindow(9F). Card Services is prohibited from resetting the PC Card and is not required to cycle power through zero(0) volts. After calling csx_ReleaseConfiguration() any resources requested via the request functions csx_RequestIO(9F), csx_RequestIRQ(9F), or csx_RequestWindow(9F) that are no longer needed should be returned to Card Services via the corresponding csx_ReleaseIO(9F), csx_Relea- seIRQ(9F), or csx_ReleaseWindow(9F) functions. csx_ReleaseConfiguration() must be called to release the current card and socket configura- tion before releasing any resources requested by the driver via the request functions named above. STRUCTURE MEMBERS
The structure members of release_config_t are: uint32_t Socket; /* socket number */ The Socket field is not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid or csx_RequestConfiguration(9F) not done. CS_BAD_SOCKET Error getting or setting socket hardware parameters. CS_NO_CARD No PC card in socket. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
This function may be called from user or kernel context. SEE ALSO
csx_RegisterClient(9F), csx_RequestConfiguration(9F), csx_RequestIO(9F), csx_RequestIRQ(9F), csx_RequestWindow(9F) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.10 19 Jul 1996 csx_ReleaseConfiguration(9F)

Check Out this Related Man Page

csx_RequestIRQ(9F)					   Kernel Functions for Drivers 					csx_RequestIRQ(9F)

NAME
csx_RequestIRQ, csx_ReleaseIRQ - request or release IRQ resource SYNOPSIS
#include <sys/pccard.h> int32_t csx_RequestIRQ(client_handle_t ch, irq_req_t *ir); int32_t csx_ReleaseIRQ(client_handle_t ch, irq_req_t *ir); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). ir Pointer to an irq_req_t structure. DESCRIPTION
The function csx_RequestIRQ() requests an IRQ resource and registers the client's IRQ handler with Card Services. If a client requires an IRQ,csx_RequestIRQ() must be called to request an IRQ resource as well as to register the client's IRQ handler with Card Services. The client will not receive callbacks at the IRQ callback handler until csx_RequestConfiguration(9F) or csx_ModifyConfigura- tion(9F) has successfully returned when either of these functions are called with the CONF_ENABLE_IRQ_STEERING bit set. The function csx_ReleaseIRQ() releases a previously requested IRQ resource. The Card Services IRQ resource list is adjusted by csx_ReleaseIRQ(). Depending on the adapter hardware, the host bus IRQ connection might also be disabled. Client IRQ handlers always run above lock level and so should take care to perform only Solaris operations that are appropriate for an above-lock-level IRQ handler. csx_RequestIRQ() fails if it has already been called without a corresponding csx_ReleaseIRQ(). STRUCTURE MEMBERS
The structure members of irq_req_t are: uint32_t Socket; /* socket number */ uint32_t Attributes; /* IRQ attribute flags */ csfunction_t *irq_handler; /* IRQ handler */ void *irq_handler_arg; /* IRQ handler argument */ ddi_iblock_cookie_t *iblk_cookie; /* IRQ interrupt /* block cookie */ ddi_idevice_cookie_t *idev_cookie; /* IRQ interrupt device /* cookie */ The fields are defined as follows: Socket Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number. Attributes This field is bit-mapped. It specifies details about the type of IRQ desired by the client. The following bits are defined: IRQ_TYPE_EXCLUSIVE IRQ is exclusive to this socket. This bit must be set. It indicates that the system IRQ is dedi- cated to this PC Card. irq_handler The client IRQ callback handler entry point is passed in the irq_handler field. irq_handler_arg The client can use the irq_handler_arg field to pass client-specific data to the client IRQ callback handler. iblk_cookie These fields must be used by the client to set up mutexes that are used in the client's IRQ callback handler. idev_cookie For a specific csx_ReleaseIRQ() call, the values in the irq_req_t structure must be the same as those returned from the previous csx_RequestIRQ() call; otherwise, CS_BAD_ARGS is returned and no changes are made to Card Services resources or the socket and adapter hardware. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_ARGS IRQ description does not match allocation. CS_BAD_ATTRIBUTE IRQ_TYPE_EXCLUSIVE not set, or an unsupported or reserved bit is set. CS_BAD_HANDLE Client handle is invalid or csx_RequestConfiguration(9F) not done. CS_BAD_IRQ Unable to allocate IRQ resources. CS_IN_USE csx_RequestIRQ() already done or a previous csx_RequestIRQ() has not been done for a corresponding csx_Relea- seIRQ(). CS_CONFIGURATION_LOCKED csx_RequestConfiguration(9F) already done or csx_ReleaseConfiguration(9F) has not been done. CS_NO_CARD No PC Card in socket. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
These functions may be called from user or kernel context. SEE ALSO
csx_ReleaseConfiguration(9F), csx_RequestConfiguration(9F) PC Card Card 95 Standard, PCMCIA/JEIDA SunOS 5.11 19 Jul 1996 csx_RequestIRQ(9F)
Man Page