Lines Matching refs:itnim
26 static void bfa_fcs_itnim_free(struct bfa_fcs_itnim_s *itnim);
33 static void bfa_fcs_itnim_aen_post(struct bfa_fcs_itnim_s *itnim,
36 static void bfa_fcs_itnim_sm_offline(struct bfa_fcs_itnim_s *itnim,
38 static void bfa_fcs_itnim_sm_prli_send(struct bfa_fcs_itnim_s *itnim,
40 static void bfa_fcs_itnim_sm_prli(struct bfa_fcs_itnim_s *itnim,
42 static void bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim,
44 static void bfa_fcs_itnim_sm_hcb_online(struct bfa_fcs_itnim_s *itnim,
46 static void bfa_fcs_itnim_sm_hal_rport_online(struct bfa_fcs_itnim_s *itnim,
48 static void bfa_fcs_itnim_sm_online(struct bfa_fcs_itnim_s *itnim,
50 static void bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim,
52 static void bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim,
71 bfa_fcs_itnim_sm_offline(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_offline() argument
74 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_offline()
75 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_offline()
79 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_send); in bfa_fcs_itnim_sm_offline()
80 itnim->prli_retries = 0; in bfa_fcs_itnim_sm_offline()
81 bfa_fcs_itnim_send_prli(itnim, NULL); in bfa_fcs_itnim_sm_offline()
85 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_offline()
89 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_initiator); in bfa_fcs_itnim_sm_offline()
93 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_offline()
97 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_offline()
103 bfa_fcs_itnim_sm_prli_send(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_prli_send() argument
106 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_prli_send()
107 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_prli_send()
111 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli); in bfa_fcs_itnim_sm_prli_send()
115 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_initiator); in bfa_fcs_itnim_sm_prli_send()
116 bfa_fcxp_walloc_cancel(itnim->fcs->bfa, &itnim->fcxp_wqe); in bfa_fcs_itnim_sm_prli_send()
117 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_FCS_ONLINE); in bfa_fcs_itnim_sm_prli_send()
121 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli_send()
122 bfa_fcxp_walloc_cancel(itnim->fcs->bfa, &itnim->fcxp_wqe); in bfa_fcs_itnim_sm_prli_send()
123 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_prli_send()
127 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli_send()
128 bfa_fcxp_walloc_cancel(itnim->fcs->bfa, &itnim->fcxp_wqe); in bfa_fcs_itnim_sm_prli_send()
129 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_prli_send()
133 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_prli_send()
138 bfa_fcs_itnim_sm_prli(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_prli() argument
141 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_prli()
142 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_prli()
146 if (itnim->rport->scsi_function == BFA_RPORT_INITIATOR) in bfa_fcs_itnim_sm_prli()
147 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_initiator); in bfa_fcs_itnim_sm_prli()
149 bfa_sm_set_state(itnim, in bfa_fcs_itnim_sm_prli()
152 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_FCS_ONLINE); in bfa_fcs_itnim_sm_prli()
156 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_retry); in bfa_fcs_itnim_sm_prli()
157 bfa_timer_start(itnim->fcs->bfa, &itnim->timer, in bfa_fcs_itnim_sm_prli()
158 bfa_fcs_itnim_timeout, itnim, in bfa_fcs_itnim_sm_prli()
163 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli()
167 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli()
168 bfa_fcxp_discard(itnim->fcxp); in bfa_fcs_itnim_sm_prli()
169 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_prli()
173 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_initiator); in bfa_fcs_itnim_sm_prli()
174 bfa_fcxp_discard(itnim->fcxp); in bfa_fcs_itnim_sm_prli()
175 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_FCS_ONLINE); in bfa_fcs_itnim_sm_prli()
179 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli()
180 bfa_fcxp_discard(itnim->fcxp); in bfa_fcs_itnim_sm_prli()
181 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_prli()
185 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_prli()
190 bfa_fcs_itnim_sm_hal_rport_online(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_hal_rport_online() argument
193 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_hal_rport_online()
194 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_hal_rport_online()
198 if (!itnim->bfa_itnim) in bfa_fcs_itnim_sm_hal_rport_online()
199 itnim->bfa_itnim = bfa_itnim_create(itnim->fcs->bfa, in bfa_fcs_itnim_sm_hal_rport_online()
200 itnim->rport->bfa_rport, itnim); in bfa_fcs_itnim_sm_hal_rport_online()
202 if (itnim->bfa_itnim) { in bfa_fcs_itnim_sm_hal_rport_online()
203 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_hcb_online); in bfa_fcs_itnim_sm_hal_rport_online()
204 bfa_itnim_online(itnim->bfa_itnim, itnim->seq_rec); in bfa_fcs_itnim_sm_hal_rport_online()
206 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hal_rport_online()
207 bfa_sm_send_event(itnim->rport, RPSM_EVENT_DELETE); in bfa_fcs_itnim_sm_hal_rport_online()
213 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hal_rport_online()
214 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_hal_rport_online()
218 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hal_rport_online()
219 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_hal_rport_online()
223 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_hal_rport_online()
228 bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_prli_retry() argument
231 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_prli_retry()
232 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_prli_retry()
236 if (itnim->prli_retries < BFA_FCS_RPORT_MAX_RETRIES) { in bfa_fcs_itnim_sm_prli_retry()
237 itnim->prli_retries++; in bfa_fcs_itnim_sm_prli_retry()
238 bfa_trc(itnim->fcs, itnim->prli_retries); in bfa_fcs_itnim_sm_prli_retry()
239 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_send); in bfa_fcs_itnim_sm_prli_retry()
240 bfa_fcs_itnim_send_prli(itnim, NULL); in bfa_fcs_itnim_sm_prli_retry()
243 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli_retry()
244 bfa_sm_send_event(itnim->rport, RPSM_EVENT_LOGO_IMP); in bfa_fcs_itnim_sm_prli_retry()
250 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli_retry()
251 bfa_timer_stop(&itnim->timer); in bfa_fcs_itnim_sm_prli_retry()
252 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_prli_retry()
256 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_initiator); in bfa_fcs_itnim_sm_prli_retry()
257 bfa_timer_stop(&itnim->timer); in bfa_fcs_itnim_sm_prli_retry()
258 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_FCS_ONLINE); in bfa_fcs_itnim_sm_prli_retry()
262 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_prli_retry()
263 bfa_timer_stop(&itnim->timer); in bfa_fcs_itnim_sm_prli_retry()
264 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_prli_retry()
268 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_prli_retry()
273 bfa_fcs_itnim_sm_hcb_online(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_hcb_online() argument
276 struct bfad_s *bfad = (struct bfad_s *)itnim->fcs->bfad; in bfa_fcs_itnim_sm_hcb_online()
280 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_hcb_online()
281 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_hcb_online()
285 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_online); in bfa_fcs_itnim_sm_hcb_online()
286 bfa_fcb_itnim_online(itnim->itnim_drv); in bfa_fcs_itnim_sm_hcb_online()
287 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(itnim->rport->port)); in bfa_fcs_itnim_sm_hcb_online()
288 wwn2str(rpwwn_buf, itnim->rport->pwwn); in bfa_fcs_itnim_sm_hcb_online()
292 bfa_fcs_itnim_aen_post(itnim, BFA_ITNIM_AEN_ONLINE); in bfa_fcs_itnim_sm_hcb_online()
296 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_hcb_offline); in bfa_fcs_itnim_sm_hcb_online()
297 bfa_itnim_offline(itnim->bfa_itnim); in bfa_fcs_itnim_sm_hcb_online()
301 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hcb_online()
302 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_hcb_online()
306 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_hcb_online()
311 bfa_fcs_itnim_sm_online(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_online() argument
314 struct bfad_s *bfad = (struct bfad_s *)itnim->fcs->bfad; in bfa_fcs_itnim_sm_online()
318 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_online()
319 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_online()
323 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_hcb_offline); in bfa_fcs_itnim_sm_online()
324 bfa_fcb_itnim_offline(itnim->itnim_drv); in bfa_fcs_itnim_sm_online()
325 bfa_itnim_offline(itnim->bfa_itnim); in bfa_fcs_itnim_sm_online()
326 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(itnim->rport->port)); in bfa_fcs_itnim_sm_online()
327 wwn2str(rpwwn_buf, itnim->rport->pwwn); in bfa_fcs_itnim_sm_online()
328 if (bfa_fcs_lport_is_online(itnim->rport->port) == BFA_TRUE) { in bfa_fcs_itnim_sm_online()
332 bfa_fcs_itnim_aen_post(itnim, BFA_ITNIM_AEN_DISCONNECT); in bfa_fcs_itnim_sm_online()
337 bfa_fcs_itnim_aen_post(itnim, BFA_ITNIM_AEN_OFFLINE); in bfa_fcs_itnim_sm_online()
342 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_online()
343 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_online()
347 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_online()
352 bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_hcb_offline() argument
355 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_hcb_offline()
356 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_hcb_offline()
360 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hcb_offline()
361 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_hcb_offline()
365 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_hcb_offline()
366 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_hcb_offline()
370 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_hcb_offline()
380 bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_sm_initiator() argument
383 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_sm_initiator()
384 bfa_trc(itnim->fcs, event); in bfa_fcs_itnim_sm_initiator()
388 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_initiator()
389 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_OFFLINE); in bfa_fcs_itnim_sm_initiator()
396 bfa_sm_send_event(itnim->rport, RPSM_EVENT_FC4_FCS_ONLINE); in bfa_fcs_itnim_sm_initiator()
404 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_sm_initiator()
405 bfa_fcs_itnim_free(itnim); in bfa_fcs_itnim_sm_initiator()
409 bfa_sm_fault(itnim->fcs, event); in bfa_fcs_itnim_sm_initiator()
414 bfa_fcs_itnim_aen_post(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_itnim_aen_post() argument
417 struct bfa_fcs_rport_s *rport = itnim->rport; in bfa_fcs_itnim_aen_post()
418 struct bfad_s *bfad = (struct bfad_s *)itnim->fcs->bfad; in bfa_fcs_itnim_aen_post()
429 aen_entry->aen_data.itnim.vf_id = rport->port->fabric->vf_id; in bfa_fcs_itnim_aen_post()
430 aen_entry->aen_data.itnim.ppwwn = bfa_fcs_lport_get_pwwn( in bfa_fcs_itnim_aen_post()
431 bfa_fcs_get_base_port(itnim->fcs)); in bfa_fcs_itnim_aen_post()
432 aen_entry->aen_data.itnim.lpwwn = bfa_fcs_lport_get_pwwn(rport->port); in bfa_fcs_itnim_aen_post()
433 aen_entry->aen_data.itnim.rpwwn = rport->pwwn; in bfa_fcs_itnim_aen_post()
443 struct bfa_fcs_itnim_s *itnim = itnim_cbarg; in bfa_fcs_itnim_send_prli() local
444 struct bfa_fcs_rport_s *rport = itnim->rport; in bfa_fcs_itnim_send_prli()
450 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_fcs_itnim_send_prli()
455 itnim->stats.fcxp_alloc_wait++; in bfa_fcs_itnim_send_prli()
456 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &itnim->fcxp_wqe, in bfa_fcs_itnim_send_prli()
457 bfa_fcs_itnim_send_prli, itnim, BFA_TRUE); in bfa_fcs_itnim_send_prli()
460 itnim->fcxp = fcxp; in bfa_fcs_itnim_send_prli()
463 itnim->rport->pid, bfa_fcs_lport_get_fcid(port), 0); in bfa_fcs_itnim_send_prli()
467 bfa_fcs_itnim_prli_response, (void *)itnim, in bfa_fcs_itnim_send_prli()
470 itnim->stats.prli_sent++; in bfa_fcs_itnim_send_prli()
471 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_FRMSENT); in bfa_fcs_itnim_send_prli()
479 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cbarg; in bfa_fcs_itnim_prli_response() local
485 bfa_trc(itnim->fcs, req_status); in bfa_fcs_itnim_prli_response()
491 itnim->stats.prli_rsp_err++; in bfa_fcs_itnim_prli_response()
492 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_RSP_ERROR); in bfa_fcs_itnim_prli_response()
502 bfa_trc(itnim->fcs, rsp_len); in bfa_fcs_itnim_prli_response()
508 bfa_trc(itnim->fcs, prli_resp->parampage.type); in bfa_fcs_itnim_prli_response()
509 itnim->rport->scsi_function = in bfa_fcs_itnim_prli_response()
511 itnim->stats.prli_rsp_acc++; in bfa_fcs_itnim_prli_response()
512 itnim->stats.initiator++; in bfa_fcs_itnim_prli_response()
513 bfa_sm_send_event(itnim, in bfa_fcs_itnim_prli_response()
518 itnim->stats.prli_rsp_parse_err++; in bfa_fcs_itnim_prli_response()
521 itnim->rport->scsi_function = BFA_RPORT_TARGET; in bfa_fcs_itnim_prli_response()
524 itnim->seq_rec = sparams->retry; in bfa_fcs_itnim_prli_response()
525 itnim->rec_support = sparams->rec_support; in bfa_fcs_itnim_prli_response()
526 itnim->task_retry_id = sparams->task_retry_id; in bfa_fcs_itnim_prli_response()
527 itnim->conf_comp = sparams->confirm; in bfa_fcs_itnim_prli_response()
529 itnim->stats.prli_rsp_acc++; in bfa_fcs_itnim_prli_response()
530 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_RSP_OK); in bfa_fcs_itnim_prli_response()
534 bfa_trc(itnim->fcs, ls_rjt->reason_code); in bfa_fcs_itnim_prli_response()
535 bfa_trc(itnim->fcs, ls_rjt->reason_code_expl); in bfa_fcs_itnim_prli_response()
537 itnim->stats.prli_rsp_rjt++; in bfa_fcs_itnim_prli_response()
539 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_RSP_NOT_SUPP); in bfa_fcs_itnim_prli_response()
542 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_RSP_ERROR); in bfa_fcs_itnim_prli_response()
549 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) arg; in bfa_fcs_itnim_timeout() local
551 itnim->stats.timeout++; in bfa_fcs_itnim_timeout()
552 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_TIMEOUT); in bfa_fcs_itnim_timeout()
556 bfa_fcs_itnim_free(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_free() argument
558 if (itnim->bfa_itnim) { in bfa_fcs_itnim_free()
559 bfa_itnim_delete(itnim->bfa_itnim); in bfa_fcs_itnim_free()
560 itnim->bfa_itnim = NULL; in bfa_fcs_itnim_free()
563 bfa_fcb_itnim_free(itnim->fcs->bfad, itnim->itnim_drv); in bfa_fcs_itnim_free()
581 struct bfa_fcs_itnim_s *itnim; in bfa_fcs_itnim_create() local
588 ret = bfa_fcb_itnim_alloc(port->fcs->bfad, &itnim, &itnim_drv); in bfa_fcs_itnim_create()
597 itnim->rport = rport; in bfa_fcs_itnim_create()
598 itnim->fcs = rport->fcs; in bfa_fcs_itnim_create()
599 itnim->itnim_drv = itnim_drv; in bfa_fcs_itnim_create()
601 itnim->bfa_itnim = NULL; in bfa_fcs_itnim_create()
602 itnim->seq_rec = BFA_FALSE; in bfa_fcs_itnim_create()
603 itnim->rec_support = BFA_FALSE; in bfa_fcs_itnim_create()
604 itnim->conf_comp = BFA_FALSE; in bfa_fcs_itnim_create()
605 itnim->task_retry_id = BFA_FALSE; in bfa_fcs_itnim_create()
610 bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline); in bfa_fcs_itnim_create()
612 return itnim; in bfa_fcs_itnim_create()
621 bfa_fcs_itnim_delete(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_delete() argument
623 bfa_trc(itnim->fcs, itnim->rport->pid); in bfa_fcs_itnim_delete()
624 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_DELETE); in bfa_fcs_itnim_delete()
631 bfa_fcs_itnim_brp_online(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_brp_online() argument
633 itnim->stats.onlines++; in bfa_fcs_itnim_brp_online()
635 if (!BFA_FCS_PID_IS_WKA(itnim->rport->pid)) in bfa_fcs_itnim_brp_online()
636 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_HAL_ONLINE); in bfa_fcs_itnim_brp_online()
643 bfa_fcs_itnim_rport_offline(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_rport_offline() argument
645 itnim->stats.offlines++; in bfa_fcs_itnim_rport_offline()
646 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_OFFLINE); in bfa_fcs_itnim_rport_offline()
654 bfa_fcs_itnim_is_initiator(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_is_initiator() argument
656 bfa_trc(itnim->fcs, itnim->rport->pid); in bfa_fcs_itnim_is_initiator()
657 itnim->stats.initiator++; in bfa_fcs_itnim_is_initiator()
658 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_INITIATOR); in bfa_fcs_itnim_is_initiator()
665 bfa_fcs_itnim_get_online_state(struct bfa_fcs_itnim_s *itnim) in bfa_fcs_itnim_get_online_state() argument
667 bfa_trc(itnim->fcs, itnim->rport->pid); in bfa_fcs_itnim_get_online_state()
668 switch (bfa_sm_to_state(itnim_sm_table, itnim->sm)) { in bfa_fcs_itnim_get_online_state()
684 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cbarg; in bfa_cb_itnim_online() local
686 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_cb_itnim_online()
687 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_HCB_ONLINE); in bfa_cb_itnim_online()
696 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cb_arg; in bfa_cb_itnim_offline() local
698 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_cb_itnim_offline()
699 bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_HCB_OFFLINE); in bfa_cb_itnim_offline()
709 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cb_arg; in bfa_cb_itnim_tov_begin() local
711 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_cb_itnim_tov_begin()
720 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cb_arg; in bfa_cb_itnim_tov() local
721 struct bfad_itnim_s *itnim_drv = itnim->itnim_drv; in bfa_cb_itnim_tov()
723 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_cb_itnim_tov()
737 struct bfa_fcs_itnim_s *itnim = (struct bfa_fcs_itnim_s *) cb_arg; in bfa_cb_itnim_sler() local
739 itnim->stats.sler++; in bfa_cb_itnim_sler()
740 bfa_trc(itnim->fcs, itnim->rport->pwwn); in bfa_cb_itnim_sler()
741 bfa_sm_send_event(itnim->rport, RPSM_EVENT_LOGO_IMP); in bfa_cb_itnim_sler()
753 WARN_ON(rport->itnim == NULL); in bfa_fcs_itnim_lookup()
754 return rport->itnim; in bfa_fcs_itnim_lookup()
761 struct bfa_fcs_itnim_s *itnim = NULL; in bfa_fcs_itnim_attr_get() local
763 itnim = bfa_fcs_itnim_lookup(port, rpwwn); in bfa_fcs_itnim_attr_get()
765 if (itnim == NULL) in bfa_fcs_itnim_attr_get()
768 attr->state = bfa_sm_to_state(itnim_sm_table, itnim->sm); in bfa_fcs_itnim_attr_get()
769 attr->retry = itnim->seq_rec; in bfa_fcs_itnim_attr_get()
770 attr->rec_support = itnim->rec_support; in bfa_fcs_itnim_attr_get()
771 attr->conf_comp = itnim->conf_comp; in bfa_fcs_itnim_attr_get()
772 attr->task_retry_id = itnim->task_retry_id; in bfa_fcs_itnim_attr_get()
780 struct bfa_fcs_itnim_s *itnim = NULL; in bfa_fcs_itnim_stats_get() local
784 itnim = bfa_fcs_itnim_lookup(port, rpwwn); in bfa_fcs_itnim_stats_get()
786 if (itnim == NULL) in bfa_fcs_itnim_stats_get()
789 memcpy(stats, &itnim->stats, sizeof(struct bfa_itnim_stats_s)); in bfa_fcs_itnim_stats_get()
797 struct bfa_fcs_itnim_s *itnim = NULL; in bfa_fcs_itnim_stats_clear() local
801 itnim = bfa_fcs_itnim_lookup(port, rpwwn); in bfa_fcs_itnim_stats_clear()
803 if (itnim == NULL) in bfa_fcs_itnim_stats_clear()
806 memset(&itnim->stats, 0, sizeof(struct bfa_itnim_stats_s)); in bfa_fcs_itnim_stats_clear()
811 bfa_fcs_fcpim_uf_recv(struct bfa_fcs_itnim_s *itnim, in bfa_fcs_fcpim_uf_recv() argument
816 bfa_trc(itnim->fcs, fchs->type); in bfa_fcs_fcpim_uf_recv()
823 bfa_trc(itnim->fcs, els_cmd->els_code); in bfa_fcs_fcpim_uf_recv()
827 bfa_fcs_rport_prlo(itnim->rport, fchs->ox_id); in bfa_fcs_fcpim_uf_recv()