Lines Matching refs:ti

347 	eibnx_thr_info_t *ti;  in eibnx_start_port_monitor()  local
353 ti = kmem_zalloc(sizeof (eibnx_thr_info_t), KM_SLEEP); in eibnx_start_port_monitor()
355 mutex_init(&ti->ti_mcg_lock, NULL, MUTEX_DRIVER, NULL); in eibnx_start_port_monitor()
356 mutex_init(&ti->ti_gw_lock, NULL, MUTEX_DRIVER, NULL); in eibnx_start_port_monitor()
357 mutex_init(&ti->ti_child_lock, NULL, MUTEX_DRIVER, NULL); in eibnx_start_port_monitor()
358 mutex_init(&ti->ti_event_lock, NULL, MUTEX_DRIVER, NULL); in eibnx_start_port_monitor()
359 cv_init(&ti->ti_event_cv, NULL, CV_DEFAULT, NULL); in eibnx_start_port_monitor()
361 ti->ti_next = NULL; in eibnx_start_port_monitor()
362 ti->ti_hca_guid = hca->hc_guid; in eibnx_start_port_monitor()
363 ti->ti_hca = hca->hc_hdl; in eibnx_start_port_monitor()
364 ti->ti_pd = hca->hc_pd; in eibnx_start_port_monitor()
365 ti->ti_pi = port->po_pi; in eibnx_start_port_monitor()
366 ti->ti_ident = kmem_zalloc(MAXNAMELEN, KM_SLEEP); in eibnx_start_port_monitor()
377 if ((hca_dip = ibtl_ibnex_hcaguid2dip(ti->ti_hca_guid)) == NULL) { in eibnx_start_port_monitor()
379 "returned NULL", ti->ti_hca_guid); in eibnx_start_port_monitor()
383 ti->ti_hca_guid, hca_dip); in eibnx_start_port_monitor()
387 ti->ti_hca_guid, hca_dip); in eibnx_start_port_monitor()
389 (void) snprintf(ti->ti_ident, MAXNAMELEN, "%s%d,%x", in eibnx_start_port_monitor()
390 hca_drv_name, hca_drv_inst, ti->ti_pi->p_port_num); in eibnx_start_port_monitor()
394 ti, 0, &p0, TS_RUN, minclsyspri); in eibnx_start_port_monitor()
396 ti->ti_kt_did = kt->t_did; in eibnx_start_port_monitor()
398 return (ti); in eibnx_start_port_monitor()
402 eibnx_stop_port_monitor(eibnx_thr_info_t *ti) in eibnx_stop_port_monitor() argument
409 mutex_enter(&ti->ti_event_lock); in eibnx_stop_port_monitor()
410 while (ti->ti_event & ENX_EVENT_COMPLETION) { in eibnx_stop_port_monitor()
411 cv_wait(&ti->ti_event_cv, &ti->ti_event_lock); in eibnx_stop_port_monitor()
413 ti->ti_event |= ENX_EVENT_DIE; in eibnx_stop_port_monitor()
414 cv_broadcast(&ti->ti_event_cv); in eibnx_stop_port_monitor()
415 mutex_exit(&ti->ti_event_lock); in eibnx_stop_port_monitor()
417 thread_join(ti->ti_kt_did); in eibnx_stop_port_monitor()
422 cv_destroy(&ti->ti_event_cv); in eibnx_stop_port_monitor()
423 mutex_destroy(&ti->ti_event_lock); in eibnx_stop_port_monitor()
424 mutex_destroy(&ti->ti_child_lock); in eibnx_stop_port_monitor()
425 mutex_destroy(&ti->ti_gw_lock); in eibnx_stop_port_monitor()
426 mutex_destroy(&ti->ti_mcg_lock); in eibnx_stop_port_monitor()
428 kmem_free(ti->ti_ident, MAXNAMELEN); in eibnx_stop_port_monitor()
429 kmem_free(ti, sizeof (eibnx_thr_info_t)); in eibnx_stop_port_monitor()
437 eibnx_thr_info_t *ti; in eibnx_terminate_monitors() local
450 for (ti = ti_list; ti; ti = ti_next) { in eibnx_terminate_monitors()
451 ti_next = ti->ti_next; in eibnx_terminate_monitors()
452 eibnx_stop_port_monitor(ti); in eibnx_terminate_monitors()
461 eibnx_configure_node(eibnx_thr_info_t *ti, eibnx_gw_info_t *gwi, in eibnx_configure_node() argument
472 if ((node_name = eibnx_make_nodename(ti, gwi->gw_portid)) == NULL) in eibnx_configure_node()
478 ret = eibnx_update_child(ti, gwi, child_dip); in eibnx_configure_node()
498 eibnx_create_node_props(child_dip, ti, gwi); in eibnx_configure_node()
521 eibnx_enqueue_child(ti, gwi, node_name, child_dip); in eibnx_configure_node()
533 eibnx_unconfigure_node(eibnx_thr_info_t *ti, eibnx_gw_info_t *gwi) in eibnx_unconfigure_node() argument
541 return (eibnx_update_child(ti, gwi, NULL)); in eibnx_unconfigure_node()
549 eibnx_thr_info_t *ti; in eibnx_locate_node_name() local
558 for (ti = ss->nx_thr_info; ti; ti = ti->ti_next) { in eibnx_locate_node_name()
559 if (ti->ti_ident[0] == '\0') in eibnx_locate_node_name()
562 mutex_enter(&ti->ti_gw_lock); in eibnx_locate_node_name()
563 for (gwi = ti->ti_gw; gwi; gwi = gwi->gw_next) { in eibnx_locate_node_name()
565 "%s@%s,%x", EIB_DRV_NAME, ti->ti_ident, in eibnx_locate_node_name()
571 mutex_exit(&ti->ti_gw_lock); in eibnx_locate_node_name()
579 if (ti == NULL || gwi == NULL) { in eibnx_locate_node_name()
583 *ti_p = ti; in eibnx_locate_node_name()
593 eibnx_thr_info_t *ti; in eibnx_locate_unconfigured_node() local
597 for (ti = ss->nx_thr_info; ti; ti = ti->ti_next) { in eibnx_locate_unconfigured_node()
598 mutex_enter(&ti->ti_child_lock); in eibnx_locate_unconfigured_node()
599 for (ch = ti->ti_child; ch; ch = ch->ch_next) { in eibnx_locate_unconfigured_node()
601 *ti_p = ti; in eibnx_locate_unconfigured_node()
604 mutex_exit(&ti->ti_child_lock); in eibnx_locate_unconfigured_node()
610 mutex_exit(&ti->ti_child_lock); in eibnx_locate_unconfigured_node()