CSX_REGISTERCLIENT(9F) | Kernel Functions for Drivers | CSX_REGISTERCLIENT(9F) |
csx_RegisterClient - register a client
#include <sys/pccard.h> int32_t csx_RegisterClient(client_handle_t *ch, client_reg_t *cr);
illumos DDI Specific (illumos DDI)
ch
mc
This function registers a client with Card Services and returns a unique client handle for the client. The client handle must be passed to csx_DeregisterClient(9F) when the client terminates.
The structure members of client_reg_t are:
uint32_t Attributes;
uint32_t EventMask;
event_callback_args_t event_callback_args;
uint32_t Version; /* CS version to expect */
csfunction_t *event_handler;
ddi_iblock_cookie_t *iblk_cookie; /* event iblk cookie */
ddi_idevice_cookie_t *idev_cookie; /* event idev cookie */
dev_info_t *dip; /* client's dip */
char driver_name[MODMAXNAMELEN];
The fields are defined as follows:
Attributes
INFO_MEM_CLIENT
INFO_MTD_CLIENT
INFO_IO_CLIENT
INFO_CARD_SHARE
INFO_CARD_EXCL
INFO_MEM_CLIENT
INFO_MTD_CLIENT
INFO_IO_CLIENT
INFO_CARD_SHARE
INFO_CARD_EXCL
Also, if either of these bits is set, and if a card of the type that the client can control is currently inserted in the socket (and after a successful call to csx_RequestSocketMask(9F)), the client will receive an artificial CS_EVENT_CARD_INSERTION event.
Event Mask
event_callback_args
void *client_data;
The client_data field may be used to provide data available to the event handler (see csx_event_handler(9E)). Typically, this is the client driver's soft state pointer.
Version
event_handler
iblk_cookie
idev_cookie
dip
driver_name
CS_SUCCESS
CS_BAD_ATTRIBUTE
CS_OUT_OF_RESOURCE
CS_BAD_VERSION
CS_BAD_HANDLE
CS_UNSUPPORTED_FUNCTION
This function may be called from user or kernel context.
csx_DeregisterClient(9F), csx_RequestSocketMask(9F)
PC Card 95 Standard, PCMCIA/JEIDA
April 9, 2016 | OmniOS |