Lines Matching refs:info

87 eibnx_port_monitor(eibnx_thr_info_t *info)  in eibnx_port_monitor()  argument
96 info->ti_pi->p_port_num); in eibnx_port_monitor()
101 info->ti_progress = 0; in eibnx_port_monitor()
109 while (info->ti_pi->p_linkstate != IBT_PORT_ACTIVE) { in eibnx_port_monitor()
110 mutex_enter(&info->ti_event_lock); in eibnx_port_monitor()
111 while ((info->ti_event & in eibnx_port_monitor()
117 cv_wait(&info->ti_event_cv, &info->ti_event_lock); in eibnx_port_monitor()
123 if (info->ti_event & ENX_EVENT_DIE) { in eibnx_port_monitor()
124 mutex_exit(&info->ti_event_lock); in eibnx_port_monitor()
127 info->ti_event &= (~ENX_EVENT_LINK_UP); in eibnx_port_monitor()
128 mutex_exit(&info->ti_event_lock); in eibnx_port_monitor()
130 info->ti_progress |= ENX_MON_LINKSTATE_UP; in eibnx_port_monitor()
138 while (eibnx_find_mgroups(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
139 mutex_enter(&info->ti_event_lock); in eibnx_port_monitor()
140 while ((info->ti_event & in eibnx_port_monitor()
146 cv_wait(&info->ti_event_cv, &info->ti_event_lock); in eibnx_port_monitor()
152 if (info->ti_event & ENX_EVENT_DIE) { in eibnx_port_monitor()
153 mutex_exit(&info->ti_event_lock); in eibnx_port_monitor()
156 info->ti_event &= (~ENX_EVENT_MCGS_AVAILABLE); in eibnx_port_monitor()
157 mutex_exit(&info->ti_event_lock); in eibnx_port_monitor()
159 info->ti_progress |= ENX_MON_FOUND_MCGS; in eibnx_port_monitor()
164 if (eibnx_setup_cq(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
167 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
170 info->ti_progress |= ENX_MON_SETUP_CQ; in eibnx_port_monitor()
175 if (eibnx_setup_ud_channel(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
178 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
181 info->ti_progress |= ENX_MON_SETUP_UD_CHAN; in eibnx_port_monitor()
186 if (eibnx_setup_bufs(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
189 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
192 info->ti_progress |= ENX_MON_SETUP_BUFS; in eibnx_port_monitor()
197 if (eibnx_setup_cq_handler(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
200 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
203 info->ti_progress |= ENX_MON_SETUP_CQ_HDLR; in eibnx_port_monitor()
208 if (eibnx_join_mcgs(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
211 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
214 info->ti_progress |= ENX_MON_JOINED_MCGS; in eibnx_port_monitor()
219 if (eibnx_fip_solicit_mcast(info) != ENX_E_SUCCESS) { in eibnx_port_monitor()
222 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
225 info->ti_progress |= ENX_MON_MULTICAST_SLCT; in eibnx_port_monitor()
227 mutex_enter(&info->ti_event_lock); in eibnx_port_monitor()
233 while ((info->ti_event & (ENX_EVENT_TIMED_OUT | ENX_EVENT_DIE)) == 0) { in eibnx_port_monitor()
238 if (cv_timedwait(&info->ti_event_cv, &info->ti_event_lock, in eibnx_port_monitor()
240 info->ti_event |= ENX_EVENT_TIMED_OUT; in eibnx_port_monitor()
248 if (info->ti_event & ENX_EVENT_DIE) { in eibnx_port_monitor()
249 mutex_exit(&info->ti_event_lock); in eibnx_port_monitor()
253 if (info->ti_event & ENX_EVENT_TIMED_OUT) { in eibnx_port_monitor()
254 if (eibnx_fip_solicit_ucast(info, in eibnx_port_monitor()
258 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_port_monitor()
260 info->ti_event &= ~ENX_EVENT_TIMED_OUT; in eibnx_port_monitor()
266 if (info->ti_progress & ENX_MON_MULTICAST_SLCT) { in eibnx_port_monitor()
267 eibnx_cleanup_port_nodes(info); in eibnx_port_monitor()
268 info->ti_progress &= (~ENX_MON_MULTICAST_SLCT); in eibnx_port_monitor()
270 if (info->ti_progress & ENX_MON_JOINED_MCGS) { in eibnx_port_monitor()
271 eibnx_rb_join_mcgs(info); in eibnx_port_monitor()
272 info->ti_progress &= (~ENX_MON_JOINED_MCGS); in eibnx_port_monitor()
274 if (info->ti_progress & ENX_MON_SETUP_CQ_HDLR) { in eibnx_port_monitor()
275 eibnx_rb_setup_cq_handler(info); in eibnx_port_monitor()
276 info->ti_progress &= (~ENX_MON_SETUP_CQ_HDLR); in eibnx_port_monitor()
278 if (info->ti_progress & ENX_MON_SETUP_BUFS) { in eibnx_port_monitor()
279 eibnx_rb_setup_bufs(info); in eibnx_port_monitor()
280 info->ti_progress &= (~ENX_MON_SETUP_BUFS); in eibnx_port_monitor()
282 if (info->ti_progress & ENX_MON_SETUP_UD_CHAN) { in eibnx_port_monitor()
283 eibnx_rb_setup_ud_channel(info); in eibnx_port_monitor()
284 info->ti_progress &= (~ENX_MON_SETUP_UD_CHAN); in eibnx_port_monitor()
286 if (info->ti_progress & ENX_MON_SETUP_CQ) { in eibnx_port_monitor()
287 eibnx_rb_setup_cq(info); in eibnx_port_monitor()
288 info->ti_progress &= (~ENX_MON_SETUP_CQ); in eibnx_port_monitor()
290 if (info->ti_progress & ENX_MON_FOUND_MCGS) { in eibnx_port_monitor()
291 eibnx_rb_find_mgroups(info); in eibnx_port_monitor()
292 info->ti_progress &= (~ENX_MON_FOUND_MCGS); in eibnx_port_monitor()
439 eibnx_gw_is_aware(eibnx_thr_info_t *info, eibnx_gw_info_t *gwi, in eibnx_gw_is_aware() argument
491 eibnx_handle_gw_info_update(info, eib_gwi.gi_portid, &eib_gwi); in eibnx_gw_is_aware()
494 eibnx_handle_gw_rebirth(info, gwi->gw_portid); in eibnx_gw_is_aware()
573 eibnx_thr_info_t *info = arg; in eibnx_comp_intr() local
575 if (info->ti_cq_hdl != cq_hdl) { in eibnx_comp_intr()
578 "ignoring completion", cq_hdl, info->ti_cq_hdl); in eibnx_comp_intr()
582 ASSERT(info->ti_softint_hdl != NULL); in eibnx_comp_intr()
584 (void) ddi_intr_trigger_softint(info->ti_softint_hdl, NULL); in eibnx_comp_intr()
595 eibnx_thr_info_t *info = (eibnx_thr_info_t *)arg1; in eibnx_comp_handler() local
607 mutex_enter(&info->ti_event_lock); in eibnx_comp_handler()
608 if (info->ti_event & (ENX_EVENT_DIE | ENX_EVENT_COMPLETION)) { in eibnx_comp_handler()
609 mutex_exit(&info->ti_event_lock); in eibnx_comp_handler()
612 info->ti_event |= ENX_EVENT_COMPLETION; in eibnx_comp_handler()
613 mutex_exit(&info->ti_event_lock); in eibnx_comp_handler()
620 ret = ibt_enable_cq_notify(info->ti_cq_hdl, IBT_NEXT_COMPLETION); in eibnx_comp_handler()
623 "failed, ret=%d", info->ti_cq_hdl, ret); in eibnx_comp_handler()
629 while ((ret = ibt_poll_cq(info->ti_cq_hdl, info->ti_wc, info->ti_cq_sz, in eibnx_comp_handler()
631 for (wc = info->ti_wc, i = 0; i < polled; i++, wc++) { in eibnx_comp_handler()
634 eibnx_handle_wcerr(wc->wc_status, wqe, info); in eibnx_comp_handler()
636 eibnx_process_rx(info, wc, wqe); in eibnx_comp_handler()
637 eibnx_return_rwqe(info, wqe); in eibnx_comp_handler()
651 mutex_enter(&info->ti_event_lock); in eibnx_comp_handler()
652 info->ti_event &= (~ENX_EVENT_COMPLETION); in eibnx_comp_handler()
653 cv_broadcast(&info->ti_event_cv); in eibnx_comp_handler()
654 mutex_exit(&info->ti_event_lock); in eibnx_comp_handler()
663 eibnx_process_rx(eibnx_thr_info_t *info, ibt_wc_t *wc, eibnx_wqe_t *wqe) in eibnx_process_rx() argument
677 if (info->ti_mcast_done == 0) { in eibnx_process_rx()
693 eibnx_handle_login_ack(info, pkt); in eibnx_process_rx()
714 orig_gwi = eibnx_find_gw_in_gwlist(info, gwi); in eibnx_process_rx()
719 (void) eibnx_add_gw_to_gwlist(info, gwi, wc, pkt); in eibnx_process_rx()
723 (void) eibnx_add_gw_to_gwlist(info, gwi, wc, pkt); in eibnx_process_rx()
727 if ((new_gwi = eibnx_add_gw_to_gwlist(info, gwi, in eibnx_process_rx()
729 eibnx_queue_for_creation(info, new_gwi); in eibnx_process_rx()
736 eibnx_replace_gw_in_gwlist(info, orig_gwi, gwi, in eibnx_process_rx()
746 eibnx_replace_gw_in_gwlist(info, orig_gwi, gwi, in eibnx_process_rx()
752 eibnx_replace_gw_in_gwlist(info, orig_gwi, gwi, in eibnx_process_rx()
754 eibnx_gw_is_aware(info, orig_gwi, gwi_changed); in eibnx_process_rx()
757 eibnx_queue_for_creation(info, orig_gwi); in eibnx_process_rx()
764 eibnx_handle_wcerr(uint8_t wcerr, eibnx_wqe_t *wqe, eibnx_thr_info_t *info) in eibnx_handle_wcerr() argument
773 info->ti_hca_guid, info->ti_pi->p_port_num, wqe->qe_type); in eibnx_handle_wcerr()
779 info->ti_hca_guid, info->ti_pi->p_port_num, wqe->qe_type); in eibnx_handle_wcerr()
785 info->ti_hca_guid, info->ti_pi->p_port_num, wqe->qe_type); in eibnx_handle_wcerr()
791 eibnx_handle_login_ack(eibnx_thr_info_t *info, uint8_t *pkt) in eibnx_handle_login_ack() argument
813 if ((rdip = eibnx_find_child_dip_by_inst(info, inst)) == NULL) { in eibnx_handle_login_ack()
816 info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_handle_login_ack()
824 "port_num=0x%x, eoib_inst=0x%x), ret=%d", info->ti_hca_guid, in eibnx_handle_login_ack()
825 info->ti_pi->p_port_num, inst, ret); in eibnx_handle_login_ack()
833 eibnx_handle_gw_rebirth(eibnx_thr_info_t *info, uint16_t portid) in eibnx_handle_gw_rebirth() argument
840 if ((rdip = eibnx_find_child_dip_by_gw(info, portid)) == NULL) { in eibnx_handle_gw_rebirth()
843 portid, info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_handle_gw_rebirth()
851 "port_num=0x%x, gw_portid=0x%x), ret=%d", info->ti_hca_guid, in eibnx_handle_gw_rebirth()
852 info->ti_pi->p_port_num, portid, ret); in eibnx_handle_gw_rebirth()
860 eibnx_handle_gw_info_update(eibnx_thr_info_t *info, uint16_t portid, in eibnx_handle_gw_info_update() argument
868 if ((rdip = eibnx_find_child_dip_by_gw(info, portid)) == NULL) { in eibnx_handle_gw_info_update()
871 portid, info->ti_hca_guid, info->ti_pi->p_port_num); in eibnx_handle_gw_info_update()
880 "ret=%d", info->ti_hca_guid, info->ti_pi->p_port_num, in eibnx_handle_gw_info_update()