csx_RequestIRQ, csx_ReleaseIRQ - request or release IRQ resource
#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);
Solaris DDI Specific (Solaris DDI)
ch
ir
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_ModifyConfiguration(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().
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
Attributes
IRQ_TYPE_EXCLUSIVE
irq_handler
irq_handler_arg
iblk_cookie
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.
CS_SUCCESS
CS_BAD_ARGS
CS_BAD_ATTRIBUTE
CS_BAD_HANDLE
CS_BAD_IRQ
CS_IN_USE
CS_CONFIGURATION_LOCKED
CS_NO_CARD
CS_UNSUPPORTED_FUNCTION
These functions may be called from user or kernel context.
csx_ReleaseConfiguration(9F), csx_RequestConfiguration(9F)
PC Card Card 95 Standard, PCMCIA/JEIDA
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |