Lines Matching defs:socket

36  *	PCMCIA nexus driver to manipulate socket and adapter
133 * SS<->CS communication and internal socket and window handling functions
282 * Setup the client type structure - this is used in the socket event
284 * the socket.
309 * global socket and window structure arrays.
339 * Go through each socket and make sure that there are no clients
341 * all the clients for every socket are gone.
348 "socket %d has registered clients\n", sn);
394 * Go through each socket and free any resource allocated to that
395 * socket, as well as any mutexs and condition variables.
477 * Return the socket to memory-only mode and turn off the
478 * socket power.
481 set_socket.socket = sp->socket_num;
502 "cs_deinit: socket %d SS_SetSocket failure %d\n",
913 * CS_NO_CARD - if no card in socket
935 * If there's no card in the socket or the card in the socket is not
1058 * See notes for cs_get_socket for a description of valid client, socket
1075 * If there's no card in the socket or the card in the socket is not
1252 * If there's no card in the socket or the card in the socket is not
1344 cmn_err(CE_CONT, "cs_get_tuple_data: socket %d "
1371 * cs_validate_cis - validates the CIS on a card in the given socket; this
1435 * If there's no card in the socket or the card in the socket is not
1465 * cs_init_cis_window - initializes the CIS window for the passed socket
1467 * calling: *sp - pointer to the per-socket structure
1479 * CS_GENERAL_FAILURE if socket has a CIS window number
1483 * CIS window allocated to this socket.
1485 * CIS window information for this socket is cleared.
1506 "cs_init_cis_window: socket %d has no CIS window\n",
1519 "cs_init_cis_window: socket %d invalid CIS window state 0x%x\n",
1574 sw.socket = sp->socket_num;
1612 * Get the window information for the CIS window for this socket.
1615 gw.socket = sp->socket_num; /* XXX - SS_GetWindow should set this */
1763 * Now, actually create the client node on the socket; this will
1766 * The DIP2SOCKET_NUM macro will return the socket and function
1779 * client node for each socket in the system. We use the
1822 * requested socket.
1854 * XXX - if we check each socket, we ned to also check for the
1865 cmn_err(CE_CONT, "cs_add_client_to_socket: socket %d "
1887 * allocated client node to the client list on this socket,
1914 cmn_err(CE_CONT, "cs_add_client_to_socket: socket %d function 0x%x "
1998 * socket) and a registration complete event.
2013 * the socket. If it is, then set CLIENT_CARD_INSERTED
2018 * if there is any card inserted in the socket, since
2026 get_ss_status.socket = sp->socket_num;
2071 * Get a pointer to this client's socket structure.
2129 * XXX - move this outside the per-socket code.
2171 * CS_BAD_SOCKET - socket number in client_handle_t is
2177 * Note that each socket always has a pseudo client with a client minor number
2192 * only for use by Socket Services. There is no socket
2199 * Check to be sure that the socket number is in range
2276 * in the socket to point to the client structure that
2278 * the only client on this socket.
2286 * to be NULL if we're the first client on this socket.
2304 * socket and function number
2326 * already the maximum number of clients for this socket. Since
2327 * the maximum number of clients per socket is pretty large,
2355 * If we don't have any clients on this socket yet, create
2356 * a new client and hang it on the socket client list.
2363 * There are other clients on this socket, so look for
2382 * Create the next available client minor number for this socket
2421 * the "event" argument, and the socket number in the "sn"
2422 * argument. The "sn" argument is a valid logical socket
2440 * handler. All other events are just queued up and the socket
2494 cmn_err(CE_CONT, "PCMCIA: socket %d disabled - please "
2507 cmn_err(CE_CONT, "cs_event: event=%s (x%x), socket=0x%x\n",
2520 * clients on this socket to make sure that they are
2527 * Point to the head of the client list for this socket, and go
2550 cmn_err(CE_CONT, "cs_event: socket %d client [%s] "
2603 * handler will wakeup this socket's event thread.
2609 * Fire off a soft interrupt that will cause the socket thread
2611 * the clients on this socket.
2636 * calling: sp - pointer to socket structure
2657 cmn_err(CE_CONT, "cs_card_insertion: event=0x%x, socket=0x%x\n",
2674 "cs_card_insertion: socket %d has no "
2681 * Apply power to the socket, enable card detect and card ready
2682 * events, then reset the socket.
2688 set_socket.socket = sp->socket_num;
2704 "cs_card_insertion: socket %d SS_SetSocket failure %d\n",
2711 * bogus since we're about to reset the socket.
2738 cmn_err(CE_CONT, "cs_card_insertion: socket %d out of RESET "
2752 cmn_err(CE_CONT, "cs_card_insertion: socket %d "
2769 gs.socket = sp->socket_num;
2773 "cs_card_insertion: socket %d SS_GetStatus failure %d\n",
2784 cmn_err(CE_CONT, "cs_card_insertion: socket %d card "
2792 cmn_err(CE_CONT, "cs_card_insertion: socket %d setting "
2822 get_socket.socket = sp->socket_num;
2825 "cs_card_insertion: socket %d SS_GetSocket failed\n",
2830 set_socket.socket = sp->socket_num;
2843 "cs_card_insertion: socket %d SS_SetSocket failed\n",
2895 * semantics, go through each client on this socket and set
2901 * the card in this socket.
2923 * calling: sp - pointer to socket structure
2934 cmn_err(CE_CONT, "cs_card_removal: socket %d\n", sp->socket_num);
2945 * nothing on this socket anymore. Note that we clear the
2953 * Turn off socket power and set the socket back to memory mode.
2954 * Disable all socket events except for CARD_INSERTION events.
2958 set_socket.socket = sp->socket_num;
2974 "cs_card_removal: socket %d SS_SetSocket failure %d\n",
2981 cmn_err(CE_CONT, "cs_card_removal: socket %d "
3009 * socket is in IO mode; this happens in cs_event_thread
3044 * of the socket. Since we never do a cv_wait on the
3118 cmn_err(CE_CONT, "cs_ready_timeout: SOCKET_RESET_TIMER socket %d\n",
3133 "socket %d\n", sp->socket_num);
3206 * Go through each socket and dispatch the appropriate events.
3217 * waking up the socket event thread handler.
3238 * cs_event_thread - This is the per-socket event thread.
3252 cmn_err(CE_CONT, "cs_event_thread: socket %d thread started\n",
3279 cmn_err(CE_CONT, "cs_event_thread: socket %d "
3292 cmn_err(CE_CONT, "cs_event_thread: socket %d sp->events 0x%x\n",
3316 cmn_err(CE_CONT, "cs_event_thread: socket %d "
3377 * The PRR will only be read if the socket is in IO
3378 * mode, if there is a card in the socket, and if there
3402 * clients on this socket to make sure that they are
3408 * Point to the head of the client list for this socket, and go
3437 * their type currently in the socket.
3446 * socket that the client can control.
3584 * is currently inserted in the socket. Socket Services
3594 * whether or not there is a card in the socket. Such clients
3597 * same socket. This flag will typically only be set by the
3603 * CSI client for this socket.
3613 * that is currently in the socket. This is a boolean
3638 * per-socket event thread.
3669 cmn_err(CE_CONT, "cs_ss_thread: socket %d "
3682 cmn_err(CE_CONT, "cs_ss_thread: socket %d "
3705 cmn_err(CE_CONT, "cs_ss_thread: socket %d calling "
3720 * Set the CS_EVENT_SS_UPDATED event for this socket so that the
3729 * Wake up this socket's event thread so that clients can
3761 * Get a pointer to this client's socket structure.
3817 * Merge all the clients' event masks and set the socket
3870 * Get a pointer to this client's socket structure.
3909 * Merge all the clients' event masks and set the socket
3939 * Get a pointer to this client's socket structure.
3958 * If there's no card in the socket or the card in the socket is not
4017 * Get a pointer to this client's socket structure.
4036 * If there's no card in the socket or the card in the socket is not
4069 * Merge all the clients' event masks and set the socket
4083 * calling: *sp - socket struct point
4098 * CS_NO_CARD - if no card is in the socket and the flags arg
4103 * Note that if the client that configured this socket has told us that
4104 * the READY pin in the PRR isn't valid and the socket is in IO
4111 * the mode that the socket is currently in.
4121 * has been done by at least one client on this socket.
4122 * If there isn't a card in the socket or the caller wants to ignore
4123 * whether the card is in the socket or not, get the current
4138 cmn_err(CE_CONT, "cs_read_event_status: socket %d "
4232 * signal when the socket is in IO mode, we just
4237 get_socket.socket = sp->socket_num;
4239 set_socket.socket = sp->socket_num;
4262 gs->socket = sp->socket_num;
4268 * If the socket is in IO mode, then clear the
4344 * Get a pointer to this client's socket structure.
4362 * if there is no card in the socket we'll still get
4381 * no card in the socket or the card in the socket is not
4391 get_socket.socket = sp->socket_num;
4397 set_socket.socket = sp->socket_num;
4490 * cs_merge_event_masks - merge the CS global socket event mask with the
4511 * If the socket is in IO mode and there is a PRR present,
4547 * cs_set_socket_event_mask - set the event mask for the socket
4555 get_socket.socket = sp->socket_num;
4559 set_socket.socket = sp->socket_num;
4594 * cs_request_window - searches through window list for the socket to find a
4609 * CS_NO_CARD - if no card is in socket
4656 * Get a pointer to this client's socket structure.
4675 * If there's no card in the socket or the card in the socket is not
4798 * Get a pointer to this client's socket structure.
4857 * Get a pointer to this client's socket structure.
4873 * If there's no card in the socket or the card in the socket is not
4933 sw.socket = gw.socket;
4937 sw.socket = sn;
5056 * Get a pointer to this client's socket structure.
5072 * If there's no card in the socket or the card in the socket is not
5386 * CS_NO_CARD - if no card is in socket
5447 * Get a pointer to this client's socket structure.
5485 * If there's no card in the socket or the card in the socket is not
5537 * that this socket supports. If this socket supportes memory
5539 * io_mmap_window_t structure on the socket structure, then we
5540 * use one IO window for all the clients on this socket. We can
5542 * only this socket shares the complete IO space of the card.
5544 * if a socket doesn't support memory mapped IO windows.
5572 set_window.socket = socket_num;
5645 * This socket supports only IO port IO windows.
5813 * Get a pointer to this client's socket structure.
5871 * The code diverges here depending on if this socket supports
5884 cmn_err(CE_CONT, "cs_release_io: socket %d !imw->count\n",
5940 * calling: sn - socket number to look for IO window on
5990 * calling: sn - socket number to look for window on
6025 * calling: sn - socket number
6067 set_window.socket = get_window.socket;
6096 set_window.socket = sn;
6131 * CS_NO_CARD - if no card is in socket
6167 * Get a pointer to this client's socket structure.
6200 * If there's no card in the socket or the card in the socket is not
6214 set_irq_handler.socket =
6245 cmn_err(CE_CONT, "cs_request_irq: socket %d irqr->Attributes 0x%x "
6296 * Get a pointer to this client's socket structure.
6332 clear_irq_handler.socket =
6363 * cs_request_configuration - sets up socket and card configuration on behalf
6371 * CS_BAD_TYPE - if the socket doesn't support a mem and IO
6375 * CS_BAD_VCC - if Vcc value is not supported by socket
6376 * CS_BAD_VPP1 - if Vpp1 value is not supported by socket
6377 * CS_BAD_VPP2 - if Vpp2 value is not supported by socket
6414 * Get a pointer to this client's socket structure.
6421 * socket, then check the socket capabilities to be sure that
6422 * this socket supports this configuration.
6427 inquire_socket.socket = sp->socket_num;
6457 * If there's no card in the socket or the card in the socket is not
6467 * validated, so we can go ahead and configure the socket and
6473 * Configure the socket with the interface type and voltages requested
6476 get_socket.socket = sp->socket_num;
6486 cmn_err(CE_CONT, "cs_request_configuration: socket %d "
6495 set_socket.socket = sp->socket_num;
6529 * protect the CIS if the socket is in MEMORY mode and the
6531 * will fail to be written. Go ahead and set the socket,
6533 * configure the adapter. Afterwards, set the socket again
6559 cmn_err(CE_CONT, "cs_request_configuration: socket %d can't init "
6635 * If the socket isn't in IO mode, WP is asserted, and we're going to
6650 * specified by the PCMCIA spec; we must write the socket/copy
6720 * Mark the socket as being in IO mode.
6736 * socket event mask.
6776 * Set the socket to the parameters that the client requested.
6835 * Get a pointer to this client's socket structure.
6882 cmn_err(CE_CONT, "cs_release_configuration: socket %d can't init "
6889 * For the Multifunction cards do not reset the socket
6904 * Set the socket back to a memory-only interface; don't change
6905 * any other parameter of the socket.
6907 get_socket.socket = sp->socket_num;
6920 set_socket.socket = sp->socket_num;
6957 * CS_NO_CARD - if no card in socket
6960 * CS_BAD_VCC - if Vcc value is not supported by socket
6961 * CS_BAD_VPP1 - if Vpp1 value is not supported by socket
6962 * CS_BAD_VPP2 - if Vpp2 value is not supported by socket
6982 * Get a pointer to this client's socket structure.
7007 * If there's no card in the socket or the card in the socket is not
7016 * Get the current socket parameters so that we can modify them.
7018 get_socket.socket = sp->socket_num;
7027 cmn_err(CE_CONT, "cs_modify_configuration: socket %d "
7034 set_socket.socket = sp->socket_num;
7062 "cs_modify_configuration: socket %d can't init "
7113 * Setup the modified socket configuration.
7131 * CS_NO_CARD - if no card in socket
7161 * Get a pointer to this client's socket structure.
7177 * If there's no card in the socket or the card in the socket is not
7204 cmn_err(CE_CONT, "cs_ACR: socket %d can't init CIS window\n",
7271 * socket and function number to the caller;
7284 * Get a pointer to this client's socket structure.
7300 * If there's no card in the socket or the card in the
7301 * socket is not for this client, then return
7353 * to specify logical socket number
7354 * !NULL - extract logical socket number from
7359 * socket number is specified in
7377 * Determine if the passed socket number is valid or not.
7413 * cs_map_log_socket - returns the physical socket number associated with
7415 * logical socket number; this is MapLogSocket
7419 * to specify logical socket number
7420 * !NULL - extract logical socket number from
7425 * socket number is specified in
7432 * socket number
7446 * Determine if the passed socket number is valid or not.
7497 * to a power table entry for the specified socket
7501 * CS_BAD_ARGS - if volts are not supported on this socket
7635 * Get a pointer to this client's socket structure.
7652 * If there's no card in the socket or the card in the socket is not
7766 cmn_err(CE_CONT, "cs_ddi_info: socket %d client [%s]\n",
7772 * Check to see if the socket number is in range - the system
7774 * a socket number that used to be present but isn't
7776 * an error if the socket number is out of range.
7782 cmn_err(CE_CONT, "cs_ddi_info: socket %d client [%s] "
7793 * Get a pointer to this client's socket structure.
7805 cmn_err(CE_CONT, "cs_ddi_info: socket %d checking client [%s] "
7895 * cs_get_sp - returns pointer to per-socket structure for passed
7896 * socket number
7898 * return: (cs_socket_t *) - pointer to socket structure
7899 * NULL - invalid socket number passed in
7919 * cs_find_sp - searches socket list and returns pointer to passed socket
7922 * return: (cs_socket_t *) - pointer to socket structure if found
7923 * NULL - socket not found
7940 * cs_add_socket - add a socket
7942 * call: sn - socket number to add
7945 * CS_BAD_SOCKET - unable to add socket
7946 * CS_BAD_WINDOW - unable to get CIS window for socket
7948 * We get called here once for each socket that the framework wants to
7973 * See if this socket has already been added - if it has, we
7974 * fail this. If we can't find the socket, then allocate
7975 * a new socket structure. If we do find the socket, then
7978 * then traverse the socket structure list and add this
7979 * next socket strcture to the end of the list.
7982 * flag and since we never delete a socket from the
8007 * Setup the socket number
8020 * When we really get the drop socket and drop
8040 * Find a window that we can use for this socket's CIS window.
8058 cmn_err(CE_CONT, "cs_add_socket: socket %d can't get CIS "
8093 cmn_err(CE_CONT, "cs_add_socket: socket %d using CIS window %d "
8101 * Get the adapter information associated with this socket so
8103 * soft interrupt handler and per-socket adapter info.
8106 gcad->socket = sp->socket_num;
8108 cmn_err(CE_CONT, "cs_add_socket: socket %d CSGetCookiesAndDip "
8120 * Setup the per-socket adapter info
8162 cmn_err(CE_CONT, "cs_add_socket: socket %d can't add "
8183 * While this next flag doesn't really describe a per-socket
8184 * resource, we still set it for each socket. When the soft
8194 * to the socket as well. We will turn it on again when
8198 set_socket.socket = sp->socket_num;
8213 cmn_err(CE_CONT, "cs_add_socket: socket %d SS_SetSocket "
8219 * The various socket-specific variables are now set up, so
8220 * increment the global socket count and also mark the
8221 * socket as available. We need to set this before we
8222 * start any of the per-socket threads so that the threads
8223 * can get a valid socket pointer when they start.
8233 * Create the per-socket event handler thread.
8243 * Create the per-socket Socket Services work thread.
8258 * cs_drop_socket - drop a socket
8260 * call: sn - socket number to drop
8263 * CS_BAD_SOCKET - unable to drop socket
8273 * Tell the socket event thread to exit and then wait for it
8283 * Tell the socket SS thread to exit and then wait for it
8288 * Mark the socket as dropped.
8299 * cs_get_socket - returns the socket and function numbers and a pointer
8300 * to the socket structure
8303 * socket number from
8304 * uint32_t *socket - pointer to socket number to use if
8307 * return with the correct socket
8313 * to the socket struct will be
8319 * The socket and function numbers are derived as follows:
8323 * Socket Services client From *socket From *socket
8324 * CSI client From client_handle From *socket
8327 cs_get_socket(client_handle_t client_handle, uint32_t *socket,
8335 sn = *socket;
8339 * socket and function numbers specified in the passed
8340 * socket number parameter, otherwise extract the socket
8352 * Check to be sure that the socket number is in range
8362 * to this socket.
8378 * from the socket number.
8381 fn = CS_GET_FUNCTION_NUMBER(*socket);
8392 * Return a socket number that is made up of the socket number
8395 *socket = CS_MAKE_SOCKET_NUMBER(sn, fn);
8561 * cs_create_cis - reads CIS on card in socket and creates CIS lists
8586 cmn_err(CE_CONT, "cs_create_cis: socket %d has no CIS\n",
8590 cmn_err(CE_CONT, "cs_create_cis: socket %d ERROR = 0x%x\n",
8622 * cs_destroy_cis - destroys CIS list for socket