Lines Matching refs:efc
33 struct efc *efc = arg; in efc_nport_cb() local
37 efc_log_debug(efc, "nport event: %s\n", efc_sm_event_name(event)); in efc_nport_cb()
39 spin_lock_irqsave(&efc->lock, flags); in efc_nport_cb()
41 spin_unlock_irqrestore(&efc->lock, flags); in efc_nport_cb()
71 if (domain->efc->enable_ini) in efc_nport_alloc()
78 efc_log_err(domain->efc, in efc_nport_alloc()
93 nport->efc = domain->efc; in efc_nport_alloc()
102 (nport->enable_tgt && enable_target_rscn(nport->efc))); in efc_nport_alloc()
129 efc_log_debug(domain->efc, "New Nport [%s]\n", nport->display_name); in efc_nport_alloc()
143 efc_log_debug(domain->efc, "[%s] free nport\n", nport->display_name); in efc_nport_free()
181 struct efc *efc = nport->efc; in efc_nport_attach() local
187 efc_log_err(efc, "Sport lookup store failed: %d\n", rc); in efc_nport_attach()
199 efc_log_debug(nport->efc, "[%s] attach nport: fc_id x%06x\n", in efc_nport_attach()
203 rc = efc_cmd_nport_attach(efc, nport, fc_id); in efc_nport_attach()
205 efc_log_err(nport->efc, in efc_nport_attach()
215 struct efc *efc = nport->efc; in efc_nport_shutdown() local
231 if (efc->link_status == EFC_LINK_STATUS_DOWN) { in efc_nport_shutdown()
236 efc_log_debug(efc, "[%s] nport shutdown vport, send logo\n", in efc_nport_shutdown()
257 struct efc *efc = nport->efc; in efc_vport_link_down() local
261 list_for_each_entry(vport, &efc->vport_list, list_entry) { in efc_vport_link_down()
276 struct efc *efc = nport->efc; in __efc_nport_common() local
299 if (efc_cmd_nport_free(efc, nport)) { in __efc_nport_common()
300 efc_log_debug(nport->efc, in __efc_nport_common()
313 efc_log_debug(nport->efc, "[%s] %-20s %-20s not handled\n", in __efc_nport_common()
348 struct efc *efc = nport->efc; in __efc_nport_vport_init() local
357 efc_log_debug(efc, "vport: letting f/w select WWN\n"); in __efc_nport_vport_init()
360 efc_log_debug(efc, "vport: hard coding port id: %x\n", in __efc_nport_vport_init()
366 if (efc_cmd_nport_alloc(efc, nport, nport->domain, in __efc_nport_vport_init()
369 efc_log_err(efc, "Can't allocate port\n"); in __efc_nport_vport_init()
385 struct efc *efc = nport->efc; in __efc_nport_vport_wait_alloc() local
419 efc_log_err(efc, "efc_node_alloc() failed\n"); in __efc_nport_vport_wait_alloc()
442 struct efc *efc = nport->efc; in __efc_nport_vport_allocated() local
459 efc_log_debug(efc, "can't find node %06x\n", FC_FID_FLOGI); in __efc_nport_vport_allocated()
475 struct efc *efc = nport->efc; in efc_vport_update_spec() local
479 spin_lock_irqsave(&efc->vport_lock, flags); in efc_vport_update_spec()
480 list_for_each_entry(vport, &efc->vport_list, list_entry) { in efc_vport_update_spec()
489 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_update_spec()
497 struct efc *efc = nport->efc; in __efc_nport_attached() local
506 efc_log_debug(efc, in __efc_nport_attached()
514 efc->tt.new_nport(efc, nport); in __efc_nport_attached()
526 efc_log_debug(efc, in __efc_nport_attached()
531 efc->tt.del_nport(efc, nport); in __efc_nport_attached()
544 struct efc *efc = nport->efc; in __efc_nport_wait_shutdown() local
563 if (efc_cmd_nport_free(efc, nport)) { in __efc_nport_wait_shutdown()
564 efc_log_err(nport->efc, "efc_hw_port_free failed\n"); in __efc_nport_wait_shutdown()
602 lockdep_assert_held(&domain->efc->lock); in efc_vport_nport_alloc()
623 struct efc *efc = domain->efc; in efc_vport_start() local
630 spin_lock_irqsave(&efc->vport_lock, flags); in efc_vport_start()
631 list_for_each_entry_safe(vport, next, &efc->vport_list, list_entry) { in efc_vport_start()
637 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_start()
647 struct efc *efc = domain->efc; in efc_nport_vport_new() local
652 if (ini && domain->efc->enable_ini == 0) { in efc_nport_vport_new()
653 efc_log_debug(efc, "driver initiator mode not enabled\n"); in efc_nport_vport_new()
657 if (tgt && domain->efc->enable_tgt == 0) { in efc_nport_vport_new()
658 efc_log_debug(efc, "driver target mode not enabled\n"); in efc_nport_vport_new()
666 vport = efc_vport_create_spec(domain->efc, wwnn, wwpn, fc_id, ini, tgt, in efc_nport_vport_new()
669 efc_log_err(efc, "failed to create vport object entry\n"); in efc_nport_vport_new()
673 spin_lock_irqsave(&efc->lock, flags); in efc_nport_vport_new()
675 spin_unlock_irqrestore(&efc->lock, flags); in efc_nport_vport_new()
681 efc_nport_vport_del(struct efc *efc, struct efc_domain *domain, in efc_nport_vport_del() argument
689 spin_lock_irqsave(&efc->vport_lock, flags); in efc_nport_vport_del()
691 list_for_each_entry_safe(vport, next, &efc->vport_list, list_entry) { in efc_nport_vport_del()
698 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_nport_vport_del()
705 spin_lock_irqsave(&efc->lock, flags); in efc_nport_vport_del()
715 spin_unlock_irqrestore(&efc->lock, flags); in efc_nport_vport_del()
720 efc_vport_del_all(struct efc *efc) in efc_vport_del_all() argument
726 spin_lock_irqsave(&efc->vport_lock, flags); in efc_vport_del_all()
727 list_for_each_entry_safe(vport, next, &efc->vport_list, list_entry) { in efc_vport_del_all()
731 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_del_all()
735 efc_vport_create_spec(struct efc *efc, uint64_t wwnn, uint64_t wwpn, in efc_vport_create_spec() argument
747 spin_lock_irqsave(&efc->vport_lock, flags); in efc_vport_create_spec()
748 list_for_each_entry(vport, &efc->vport_list, list_entry) { in efc_vport_create_spec()
751 efc_log_err(efc, in efc_vport_create_spec()
754 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_create_spec()
761 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_create_spec()
774 list_add_tail(&vport->list_entry, &efc->vport_list); in efc_vport_create_spec()
775 spin_unlock_irqrestore(&efc->vport_lock, flags); in efc_vport_create_spec()