• Home
  • Raw
  • Download

Lines Matching refs:node

16 efc_d_send_prli_rsp(struct efc_node *node, u16 ox_id)  in efc_d_send_prli_rsp()  argument
19 struct efc *efc = node->efc; in efc_d_send_prli_rsp()
21 node->ls_acc_oxid = ox_id; in efc_d_send_prli_rsp()
22 node->send_ls_acc = EFC_NODE_SEND_LS_ACC_PRLI; in efc_d_send_prli_rsp()
29 if (node->init) { in efc_d_send_prli_rsp()
31 node->display_name, node->wwpn, node->wwnn); in efc_d_send_prli_rsp()
32 if (node->nport->enable_tgt) in efc_d_send_prli_rsp()
33 rc = efc->tt.scsi_new_node(efc, node); in efc_d_send_prli_rsp()
37 efc_node_post_event(node, EFC_EVT_NODE_SESS_REG_FAIL, NULL); in efc_d_send_prli_rsp()
40 efc_node_post_event(node, EFC_EVT_NODE_SESS_REG_OK, NULL); in efc_d_send_prli_rsp()
47 struct efc_node *node = NULL; in __efc_d_common() local
50 node = ctx->app; in __efc_d_common()
51 efc = node->efc; in __efc_d_common()
56 efc_log_debug(efc, "[%s] %-20s %-20s\n", node->display_name, in __efc_d_common()
58 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_common()
59 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_common()
63 node->display_name, funcname, in __efc_d_common()
65 node->shutdown_reason = EFC_NODE_SHUTDOWN_EXPLICIT_LOGO; in __efc_d_common()
66 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_common()
69 efc_log_debug(efc, "[%s] %-20s %-20s\n", node->display_name, in __efc_d_common()
71 node->shutdown_reason = EFC_NODE_SHUTDOWN_IMPLICIT_LOGO; in __efc_d_common()
72 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_common()
85 struct efc_node *node = ctx->app; in __efc_d_wait_del_node() local
98 efc_node_hold_frames(node); in __efc_d_wait_del_node()
113 efc_node_initiate_cleanup(node); in __efc_d_wait_del_node()
117 efc_node_accept_frames(node); in __efc_d_wait_del_node()
122 WARN_ON(!node->els_req_cnt); in __efc_d_wait_del_node()
123 node->els_req_cnt--; in __efc_d_wait_del_node()
129 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_del_node()
134 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_del_node()
148 struct efc_node *node = ctx->app; in __efc_d_wait_del_ini_tgt() local
156 efc_node_hold_frames(node); in __efc_d_wait_del_ini_tgt()
166 efc_node_transition(node, __efc_d_wait_del_node, NULL); in __efc_d_wait_del_ini_tgt()
170 efc_node_accept_frames(node); in __efc_d_wait_del_ini_tgt()
175 WARN_ON(!node->els_req_cnt); in __efc_d_wait_del_ini_tgt()
176 node->els_req_cnt--; in __efc_d_wait_del_ini_tgt()
182 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_del_ini_tgt()
187 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_del_ini_tgt()
201 struct efc_node *node = ctx->app; in __efc_d_initiate_shutdown() local
202 struct efc *efc = node->efc; in __efc_d_initiate_shutdown()
213 node->els_io_enabled = false; in __efc_d_initiate_shutdown()
216 if (node->init && !node->targ) { in __efc_d_initiate_shutdown()
217 efc_log_info(node->efc, in __efc_d_initiate_shutdown()
219 node->display_name, in __efc_d_initiate_shutdown()
220 node->wwpn, node->wwnn); in __efc_d_initiate_shutdown()
221 efc_node_transition(node, in __efc_d_initiate_shutdown()
224 if (node->nport->enable_tgt) in __efc_d_initiate_shutdown()
225 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_initiate_shutdown()
229 efc_node_post_event(node, in __efc_d_initiate_shutdown()
232 } else if (node->targ && !node->init) { in __efc_d_initiate_shutdown()
233 efc_log_info(node->efc, in __efc_d_initiate_shutdown()
235 node->display_name, in __efc_d_initiate_shutdown()
236 node->wwpn, node->wwnn); in __efc_d_initiate_shutdown()
237 efc_node_transition(node, in __efc_d_initiate_shutdown()
240 if (node->nport->enable_ini) in __efc_d_initiate_shutdown()
241 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_initiate_shutdown()
245 efc_node_post_event(node, in __efc_d_initiate_shutdown()
248 } else if (node->init && node->targ) { in __efc_d_initiate_shutdown()
249 efc_log_info(node->efc, in __efc_d_initiate_shutdown()
251 node->display_name, node->wwpn, node->wwnn); in __efc_d_initiate_shutdown()
252 efc_node_transition(node, __efc_d_wait_del_ini_tgt, in __efc_d_initiate_shutdown()
254 if (node->nport->enable_tgt) in __efc_d_initiate_shutdown()
255 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_initiate_shutdown()
259 efc_node_post_event(node, in __efc_d_initiate_shutdown()
263 if (node->nport->enable_ini) in __efc_d_initiate_shutdown()
264 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_initiate_shutdown()
268 efc_node_post_event(node, in __efc_d_initiate_shutdown()
280 if (node->attached) { in __efc_d_initiate_shutdown()
285 rc = efc_cmd_node_detach(efc, &node->rnode); in __efc_d_initiate_shutdown()
287 node_printf(node, in __efc_d_initiate_shutdown()
293 if (!node->init && !node->targ) { in __efc_d_initiate_shutdown()
299 efc_node_initiate_cleanup(node); in __efc_d_initiate_shutdown()
317 struct efc_node *node = ctx->app; in __efc_d_wait_loop() local
325 efc_node_hold_frames(node); in __efc_d_wait_loop()
329 efc_node_accept_frames(node); in __efc_d_wait_loop()
334 efc_node_init_device(node, true); in __efc_d_wait_loop()
343 efc_send_ls_acc_after_attach(struct efc_node *node, in efc_send_ls_acc_after_attach() argument
350 WARN_ON(node->send_ls_acc != EFC_NODE_SEND_LS_ACC_NONE); in efc_send_ls_acc_after_attach()
352 node->ls_acc_oxid = ox_id; in efc_send_ls_acc_after_attach()
353 node->send_ls_acc = ls; in efc_send_ls_acc_after_attach()
354 node->ls_acc_did = ntoh24(hdr->fh_d_id); in efc_send_ls_acc_after_attach()
358 efc_process_prli_payload(struct efc_node *node, void *prli) in efc_process_prli_payload() argument
366 node->init = (pp->sp.spp_flags & FCP_SPPF_INIT_FCN) != 0; in efc_process_prli_payload()
367 node->targ = (pp->sp.spp_flags & FCP_SPPF_TARG_FCN) != 0; in efc_process_prli_payload()
374 struct efc_node *node = ctx->app; in __efc_d_wait_plogi_acc_cmpl() local
382 efc_node_hold_frames(node); in __efc_d_wait_plogi_acc_cmpl()
386 efc_node_accept_frames(node); in __efc_d_wait_plogi_acc_cmpl()
390 WARN_ON(!node->els_cmpl_cnt); in __efc_d_wait_plogi_acc_cmpl()
391 node->els_cmpl_cnt--; in __efc_d_wait_plogi_acc_cmpl()
392 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_plogi_acc_cmpl()
393 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_wait_plogi_acc_cmpl()
397 WARN_ON(!node->els_cmpl_cnt); in __efc_d_wait_plogi_acc_cmpl()
398 node->els_cmpl_cnt--; in __efc_d_wait_plogi_acc_cmpl()
399 efc_node_transition(node, __efc_d_port_logged_in, NULL); in __efc_d_wait_plogi_acc_cmpl()
411 struct efc_node *node = ctx->app; in __efc_d_wait_logo_rsp() local
419 efc_node_hold_frames(node); in __efc_d_wait_logo_rsp()
423 efc_node_accept_frames(node); in __efc_d_wait_logo_rsp()
434 WARN_ON(!node->els_req_cnt); in __efc_d_wait_logo_rsp()
435 node->els_req_cnt--; in __efc_d_wait_logo_rsp()
436 node_printf(node, in __efc_d_wait_logo_rsp()
440 efc_node_post_event(node, EFC_EVT_SHUTDOWN_EXPLICIT_LOGO, in __efc_d_wait_logo_rsp()
450 efc_node_init_device(struct efc_node *node, bool send_plogi) in efc_node_init_device() argument
452 node->send_plogi = send_plogi; in efc_node_init_device()
453 if ((node->efc->nodedb_mask & EFC_NODEDB_PAUSE_NEW_NODES) && in efc_node_init_device()
454 (node->rnode.fc_id != FC_FID_DOM_MGR)) { in efc_node_init_device()
455 node->nodedb_state = __efc_d_init; in efc_node_init_device()
456 efc_node_transition(node, __efc_node_paused, NULL); in efc_node_init_device()
458 efc_node_transition(node, __efc_d_init, NULL); in efc_node_init_device()
463 efc_d_check_plogi_topology(struct efc_node *node, u32 d_id) in efc_d_check_plogi_topology() argument
465 switch (node->nport->topology) { in efc_d_check_plogi_topology()
470 efc_domain_attach(node->nport->domain, d_id); in efc_d_check_plogi_topology()
471 efc_node_transition(node, __efc_d_wait_domain_attach, NULL); in efc_d_check_plogi_topology()
478 efc_node_transition(node, __efc_d_wait_domain_attach, NULL); in efc_d_check_plogi_topology()
493 node_printf(node, "received PLOGI, unknown topology did=0x%x\n", in efc_d_check_plogi_topology()
495 efc_node_transition(node, __efc_d_wait_topology_notify, NULL); in efc_d_check_plogi_topology()
498 node_printf(node, "received PLOGI, unexpected topology %d\n", in efc_d_check_plogi_topology()
499 node->nport->topology); in efc_d_check_plogi_topology()
507 struct efc_node *node = ctx->app; in __efc_d_init() local
520 if (!node->send_plogi) in __efc_d_init()
525 if (node->nport->enable_ini && in __efc_d_init()
526 node->nport->domain->attached) { in __efc_d_init()
527 efc_send_plogi(node); in __efc_d_init()
529 efc_node_transition(node, __efc_d_wait_plogi_rsp, NULL); in __efc_d_init()
531 node_printf(node, "not sending plogi nport.ini=%d,", in __efc_d_init()
532 node->nport->enable_ini); in __efc_d_init()
533 node_printf(node, "domain attached=%d\n", in __efc_d_init()
534 node->nport->domain->attached); in __efc_d_init()
542 efc_node_save_sparms(node, cbdata->payload->dma.virt); in __efc_d_init()
543 efc_send_ls_acc_after_attach(node, in __efc_d_init()
548 if (!node->nport->domain->attached) { in __efc_d_init()
549 efc_d_check_plogi_topology(node, ntoh24(hdr->fh_d_id)); in __efc_d_init()
554 rc = efc_node_attach(node); in __efc_d_init()
555 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_init()
557 efc_node_post_event(node, EFC_EVT_NODE_ATTACH_FAIL, NULL); in __efc_d_init()
572 memcpy(node->nport->domain->flogi_service_params, in __efc_d_init()
577 efc_fabric_set_topology(node, EFC_NPORT_TOPO_P2P); in __efc_d_init()
579 efc_send_flogi_p2p_acc(node, be16_to_cpu(hdr->fh_ox_id), d_id); in __efc_d_init()
581 if (efc_p2p_setup(node->nport)) { in __efc_d_init()
582 node_printf(node, "p2p failed, shutting down node\n"); in __efc_d_init()
583 efc_node_post_event(node, EFC_EVT_SHUTDOWN, NULL); in __efc_d_init()
587 efc_node_transition(node, __efc_p2p_wait_flogi_acc_cmpl, NULL); in __efc_d_init()
594 if (!node->nport->domain->attached) { in __efc_d_init()
600 node_printf(node, "%s domain not attached, dropping\n", in __efc_d_init()
602 efc_node_post_event(node, in __efc_d_init()
607 efc_send_logo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_init()
608 efc_node_transition(node, __efc_d_wait_logo_acc_cmpl, NULL); in __efc_d_init()
619 if (!node->nport->domain->attached) { in __efc_d_init()
624 node_printf(node, "%s domain not attached, dropping\n", in __efc_d_init()
627 efc_node_post_event(node, in __efc_d_init()
632 node_printf(node, "%s received, sending reject\n", in __efc_d_init()
635 efc_send_ls_rjt(node, be16_to_cpu(hdr->fh_ox_id), in __efc_d_init()
645 if (!node->nport->domain->attached) { in __efc_d_init()
651 node_printf(node, "%s domain not attached, dropping\n", in __efc_d_init()
653 efc_node_post_event(node, in __efc_d_init()
660 node_printf(node, "FCP_CMND received, send LOGO\n"); in __efc_d_init()
661 if (efc_send_logo(node)) { in __efc_d_init()
666 node_printf(node, "Failed to send LOGO\n"); in __efc_d_init()
667 efc_node_post_event(node, in __efc_d_init()
672 efc_node_transition(node, in __efc_d_init()
692 struct efc_node *node = ctx->app; in __efc_d_wait_plogi_rsp() local
708 efc_node_save_sparms(node, cbdata->payload->dma.virt); in __efc_d_wait_plogi_rsp()
709 efc_send_ls_acc_after_attach(node, in __efc_d_wait_plogi_rsp()
713 rc = efc_node_attach(node); in __efc_d_wait_plogi_rsp()
714 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_wait_plogi_rsp()
716 efc_node_post_event(node, in __efc_d_wait_plogi_rsp()
730 efc_process_prli_payload(node, cbdata->payload->dma.virt); in __efc_d_wait_plogi_rsp()
731 efc_send_ls_acc_after_attach(node, in __efc_d_wait_plogi_rsp()
734 efc_node_transition(node, __efc_d_wait_plogi_rsp_recvd_prli, in __efc_d_wait_plogi_rsp()
747 node_printf(node, "%s received, sending reject\n", in __efc_d_wait_plogi_rsp()
750 efc_send_ls_rjt(node, be16_to_cpu(hdr->fh_ox_id), in __efc_d_wait_plogi_rsp()
762 WARN_ON(!node->els_req_cnt); in __efc_d_wait_plogi_rsp()
763 node->els_req_cnt--; in __efc_d_wait_plogi_rsp()
765 efc_node_save_sparms(node, cbdata->els_rsp.virt); in __efc_d_wait_plogi_rsp()
766 rc = efc_node_attach(node); in __efc_d_wait_plogi_rsp()
767 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_wait_plogi_rsp()
769 efc_node_post_event(node, in __efc_d_wait_plogi_rsp()
780 WARN_ON(!node->els_req_cnt); in __efc_d_wait_plogi_rsp()
781 node->els_req_cnt--; in __efc_d_wait_plogi_rsp()
782 efc_node_post_event(node, EFC_EVT_SHUTDOWN, NULL); in __efc_d_wait_plogi_rsp()
791 WARN_ON(!node->els_req_cnt); in __efc_d_wait_plogi_rsp()
792 node->els_req_cnt--; in __efc_d_wait_plogi_rsp()
799 node_printf(node, "FCP_CMND received, drop\n"); in __efc_d_wait_plogi_rsp()
814 struct efc_node *node = ctx->app; in __efc_d_wait_plogi_rsp_recvd_prli() local
832 efc_node_hold_frames(node); in __efc_d_wait_plogi_rsp_recvd_prli()
836 efc_node_accept_frames(node); in __efc_d_wait_plogi_rsp_recvd_prli()
845 WARN_ON(!node->els_req_cnt); in __efc_d_wait_plogi_rsp_recvd_prli()
846 node->els_req_cnt--; in __efc_d_wait_plogi_rsp_recvd_prli()
848 efc_node_save_sparms(node, cbdata->els_rsp.virt); in __efc_d_wait_plogi_rsp_recvd_prli()
849 rc = efc_node_attach(node); in __efc_d_wait_plogi_rsp_recvd_prli()
850 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_wait_plogi_rsp_recvd_prli()
852 efc_node_post_event(node, EFC_EVT_NODE_ATTACH_FAIL, in __efc_d_wait_plogi_rsp_recvd_prli()
864 WARN_ON(!node->els_req_cnt); in __efc_d_wait_plogi_rsp_recvd_prli()
865 node->els_req_cnt--; in __efc_d_wait_plogi_rsp_recvd_prli()
866 efc_node_post_event(node, EFC_EVT_SHUTDOWN, NULL); in __efc_d_wait_plogi_rsp_recvd_prli()
879 struct efc_node *node = ctx->app; in __efc_d_wait_domain_attach() local
887 efc_node_hold_frames(node); in __efc_d_wait_domain_attach()
891 efc_node_accept_frames(node); in __efc_d_wait_domain_attach()
895 WARN_ON(!node->nport->domain->attached); in __efc_d_wait_domain_attach()
897 rc = efc_node_attach(node); in __efc_d_wait_domain_attach()
898 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_wait_domain_attach()
900 efc_node_post_event(node, EFC_EVT_NODE_ATTACH_FAIL, in __efc_d_wait_domain_attach()
915 struct efc_node *node = ctx->app; in __efc_d_wait_topology_notify() local
923 efc_node_hold_frames(node); in __efc_d_wait_topology_notify()
927 efc_node_accept_frames(node); in __efc_d_wait_topology_notify()
933 WARN_ON(node->nport->domain->attached); in __efc_d_wait_topology_notify()
935 WARN_ON(node->send_ls_acc != EFC_NODE_SEND_LS_ACC_PLOGI); in __efc_d_wait_topology_notify()
937 node_printf(node, "topology notification, topology=%d\n", in __efc_d_wait_topology_notify()
949 efc_domain_attach(node->nport->domain, in __efc_d_wait_topology_notify()
950 node->ls_acc_did); in __efc_d_wait_topology_notify()
957 efc_node_transition(node, __efc_d_wait_domain_attach, NULL); in __efc_d_wait_topology_notify()
961 WARN_ON(!node->nport->domain->attached); in __efc_d_wait_topology_notify()
962 node_printf(node, "domain attach ok\n"); in __efc_d_wait_topology_notify()
964 rc = efc_node_attach(node); in __efc_d_wait_topology_notify()
965 efc_node_transition(node, __efc_d_wait_node_attach, NULL); in __efc_d_wait_topology_notify()
967 efc_node_post_event(node, in __efc_d_wait_topology_notify()
981 struct efc_node *node = ctx->app; in __efc_d_wait_node_attach() local
989 efc_node_hold_frames(node); in __efc_d_wait_node_attach()
993 efc_node_accept_frames(node); in __efc_d_wait_node_attach()
997 node->attached = true; in __efc_d_wait_node_attach()
998 switch (node->send_ls_acc) { in __efc_d_wait_node_attach()
1002 efc_send_plogi_acc(node, node->ls_acc_oxid); in __efc_d_wait_node_attach()
1003 efc_node_transition(node, __efc_d_wait_plogi_acc_cmpl, in __efc_d_wait_node_attach()
1005 node->send_ls_acc = EFC_NODE_SEND_LS_ACC_NONE; in __efc_d_wait_node_attach()
1006 node->ls_acc_io = NULL; in __efc_d_wait_node_attach()
1010 efc_d_send_prli_rsp(node, node->ls_acc_oxid); in __efc_d_wait_node_attach()
1011 node->send_ls_acc = EFC_NODE_SEND_LS_ACC_NONE; in __efc_d_wait_node_attach()
1012 node->ls_acc_io = NULL; in __efc_d_wait_node_attach()
1019 efc_node_transition(node, in __efc_d_wait_node_attach()
1027 node->attached = false; in __efc_d_wait_node_attach()
1028 node_printf(node, "node attach failed\n"); in __efc_d_wait_node_attach()
1029 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_node_attach()
1030 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_wait_node_attach()
1035 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_node_attach()
1036 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_node_attach()
1037 efc_node_transition(node, __efc_d_wait_attach_evt_shutdown, in __efc_d_wait_node_attach()
1041 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_node_attach()
1042 node->shutdown_reason = EFC_NODE_SHUTDOWN_EXPLICIT_LOGO; in __efc_d_wait_node_attach()
1043 efc_node_transition(node, __efc_d_wait_attach_evt_shutdown, in __efc_d_wait_node_attach()
1047 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_node_attach()
1048 node->shutdown_reason = EFC_NODE_SHUTDOWN_IMPLICIT_LOGO; in __efc_d_wait_node_attach()
1049 efc_node_transition(node, in __efc_d_wait_node_attach()
1061 struct efc_node *node = ctx->app; in __efc_d_wait_attach_evt_shutdown() local
1069 efc_node_hold_frames(node); in __efc_d_wait_attach_evt_shutdown()
1073 efc_node_accept_frames(node); in __efc_d_wait_attach_evt_shutdown()
1078 node->attached = true; in __efc_d_wait_attach_evt_shutdown()
1079 node_printf(node, "Attach evt=%s, proceed to shutdown\n", in __efc_d_wait_attach_evt_shutdown()
1081 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_wait_attach_evt_shutdown()
1086 node->attached = false; in __efc_d_wait_attach_evt_shutdown()
1087 node_printf(node, "Attach evt=%s, proceed to shutdown\n", in __efc_d_wait_attach_evt_shutdown()
1089 efc_node_transition(node, __efc_d_initiate_shutdown, NULL); in __efc_d_wait_attach_evt_shutdown()
1095 node->shutdown_reason = EFC_NODE_SHUTDOWN_DEFAULT; in __efc_d_wait_attach_evt_shutdown()
1100 node_printf(node, "%s received\n", efc_sm_event_name(evt)); in __efc_d_wait_attach_evt_shutdown()
1113 struct efc_node *node = ctx->app; in __efc_d_port_logged_in() local
1122 if (node->nport->enable_ini && in __efc_d_port_logged_in()
1123 !(node->rnode.fc_id != FC_FID_DOM_MGR)) { in __efc_d_port_logged_in()
1125 efc_send_prli(node); in __efc_d_port_logged_in()
1145 efc_send_ls_rjt(node, be16_to_cpu(hdr->fh_ox_id), in __efc_d_port_logged_in()
1150 efc_process_prli_payload(node, cbdata->payload->dma.virt); in __efc_d_port_logged_in()
1151 efc_d_send_prli_rsp(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_port_logged_in()
1156 if (node->send_ls_acc == EFC_NODE_SEND_LS_ACC_PRLI) in __efc_d_port_logged_in()
1157 efc_send_prli_acc(node, node->ls_acc_oxid); in __efc_d_port_logged_in()
1159 node->send_ls_acc = EFC_NODE_SEND_LS_ACC_NONE; in __efc_d_port_logged_in()
1160 efc_node_transition(node, __efc_d_device_ready, NULL); in __efc_d_port_logged_in()
1164 efc_send_ls_rjt(node, node->ls_acc_oxid, ELS_RJT_UNAB, in __efc_d_port_logged_in()
1166 node->send_ls_acc = EFC_NODE_SEND_LS_ACC_NONE; in __efc_d_port_logged_in()
1175 WARN_ON(!node->els_req_cnt); in __efc_d_port_logged_in()
1176 node->els_req_cnt--; in __efc_d_port_logged_in()
1178 efc_process_prli_payload(node, cbdata->els_rsp.virt); in __efc_d_port_logged_in()
1179 efc_node_transition(node, __efc_d_device_ready, NULL); in __efc_d_port_logged_in()
1189 WARN_ON(!node->els_req_cnt); in __efc_d_port_logged_in()
1190 node->els_req_cnt--; in __efc_d_port_logged_in()
1191 efc_node_post_event(node, EFC_EVT_SHUTDOWN, NULL); in __efc_d_port_logged_in()
1206 WARN_ON(!node->els_req_cnt); in __efc_d_port_logged_in()
1207 node->els_req_cnt--; in __efc_d_port_logged_in()
1217 WARN_ON(!node->els_cmpl_cnt); in __efc_d_port_logged_in()
1218 node->els_cmpl_cnt--; in __efc_d_port_logged_in()
1227 efc_node_save_sparms(node, cbdata->payload->dma.virt); in __efc_d_port_logged_in()
1228 efc_send_ls_acc_after_attach(node, in __efc_d_port_logged_in()
1235 efc_node_post_event(node, EFC_EVT_SHUTDOWN_IMPLICIT_LOGO, in __efc_d_port_logged_in()
1244 node_printf(node, "%s received attached=%d\n", in __efc_d_port_logged_in()
1246 node->attached); in __efc_d_port_logged_in()
1248 efc_send_logo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_port_logged_in()
1249 efc_node_transition(node, __efc_d_wait_logo_acc_cmpl, NULL); in __efc_d_port_logged_in()
1262 struct efc_node *node = ctx->app; in __efc_d_wait_logo_acc_cmpl() local
1270 efc_node_hold_frames(node); in __efc_d_wait_logo_acc_cmpl()
1274 efc_node_accept_frames(node); in __efc_d_wait_logo_acc_cmpl()
1280 WARN_ON(!node->els_cmpl_cnt); in __efc_d_wait_logo_acc_cmpl()
1281 node->els_cmpl_cnt--; in __efc_d_wait_logo_acc_cmpl()
1282 efc_node_post_event(node, in __efc_d_wait_logo_acc_cmpl()
1295 struct efc_node *node = ctx->app; in __efc_d_device_ready() local
1296 struct efc *efc = node->efc; in __efc_d_device_ready()
1305 node->fcp_enabled = true; in __efc_d_device_ready()
1306 if (node->targ) { in __efc_d_device_ready()
1309 node->display_name, in __efc_d_device_ready()
1310 node->wwpn, node->wwnn); in __efc_d_device_ready()
1311 if (node->nport->enable_ini) in __efc_d_device_ready()
1312 efc->tt.scsi_new_node(efc, node); in __efc_d_device_ready()
1317 node->fcp_enabled = false; in __efc_d_device_ready()
1325 efc_node_save_sparms(node, cbdata->payload->dma.virt); in __efc_d_device_ready()
1326 efc_send_ls_acc_after_attach(node, in __efc_d_device_ready()
1334 efc_node_post_event(node, in __efc_d_device_ready()
1350 efc_send_ls_rjt(node, be16_to_cpu(hdr->fh_ox_id), in __efc_d_device_ready()
1355 efc_process_prli_payload(node, cbdata->payload->dma.virt); in __efc_d_device_ready()
1356 efc_send_prli_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_device_ready()
1363 efc_send_prlo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_device_ready()
1371 node_printf(node, "%s received attached=%d\n", in __efc_d_device_ready()
1372 efc_sm_event_name(evt), node->attached); in __efc_d_device_ready()
1374 efc_send_logo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_device_ready()
1375 efc_node_transition(node, __efc_d_wait_logo_acc_cmpl, NULL); in __efc_d_device_ready()
1382 efc_send_adisc_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_device_ready()
1399 if (node->nport->enable_rscn) in __efc_d_device_ready()
1400 efc_node_transition(node, __efc_d_device_gone, NULL); in __efc_d_device_ready()
1406 WARN_ON(!node->els_cmpl_cnt); in __efc_d_device_ready()
1407 node->els_cmpl_cnt--; in __efc_d_device_ready()
1412 WARN_ON(!node->els_cmpl_cnt); in __efc_d_device_ready()
1413 node->els_cmpl_cnt--; in __efc_d_device_ready()
1414 node_printf(node, "Failed to send PRLI LS_ACC\n"); in __efc_d_device_ready()
1427 struct efc_node *node = ctx->app; in __efc_d_device_gone() local
1428 struct efc *efc = node->efc; in __efc_d_device_gone()
1443 node->display_name, in __efc_d_device_gone()
1444 labels[(node->targ << 1) | (node->init)], in __efc_d_device_gone()
1445 node->wwpn, node->wwnn); in __efc_d_device_gone()
1447 switch (efc_node_get_enable(node)) { in __efc_d_device_gone()
1451 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1458 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1463 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1468 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1473 rc = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1475 rc_2 = efc->tt.scsi_del_node(efc, node, in __efc_d_device_gone()
1486 efc_node_post_event(node, EFC_EVT_SHUTDOWN, NULL); in __efc_d_device_gone()
1498 efc_send_adisc(node); in __efc_d_device_gone()
1499 efc_node_transition(node, __efc_d_wait_adisc_rsp, NULL); in __efc_d_device_gone()
1507 efc_node_save_sparms(node, cbdata->payload->dma.virt); in __efc_d_device_gone()
1508 efc_send_ls_acc_after_attach(node, in __efc_d_device_gone()
1516 efc_node_post_event(node, EFC_EVT_SHUTDOWN_IMPLICIT_LOGO, in __efc_d_device_gone()
1526 node_printf(node, "FCP_CMND received, drop\n"); in __efc_d_device_gone()
1533 node_printf(node, "%s received attached=%d\n", in __efc_d_device_gone()
1534 efc_sm_event_name(evt), node->attached); in __efc_d_device_gone()
1536 efc_send_logo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_device_gone()
1537 efc_node_transition(node, __efc_d_wait_logo_acc_cmpl, NULL); in __efc_d_device_gone()
1550 struct efc_node *node = ctx->app; in __efc_d_wait_adisc_rsp() local
1562 WARN_ON(!node->els_req_cnt); in __efc_d_wait_adisc_rsp()
1563 node->els_req_cnt--; in __efc_d_wait_adisc_rsp()
1564 efc_node_transition(node, __efc_d_device_ready, NULL); in __efc_d_wait_adisc_rsp()
1576 WARN_ON(!node->els_req_cnt); in __efc_d_wait_adisc_rsp()
1577 node->els_req_cnt--; in __efc_d_wait_adisc_rsp()
1579 efc_node_post_event(node, in __efc_d_wait_adisc_rsp()
1592 node_printf(node, "%s received attached=%d\n", in __efc_d_wait_adisc_rsp()
1593 efc_sm_event_name(evt), node->attached); in __efc_d_wait_adisc_rsp()
1595 efc_send_logo_acc(node, be16_to_cpu(hdr->fh_ox_id)); in __efc_d_wait_adisc_rsp()
1596 efc_node_transition(node, __efc_d_wait_logo_acc_cmpl, NULL); in __efc_d_wait_adisc_rsp()