Lines Matching refs:domain
45 efc_nport_find_wwn(struct efc_domain *domain, uint64_t wwnn, uint64_t wwpn) in efc_nport_find_wwn() argument
50 list_for_each_entry(nport, &domain->nport_list, list_entry) { in efc_nport_find_wwn()
66 efc_nport_alloc(struct efc_domain *domain, uint64_t wwpn, uint64_t wwnn, in efc_nport_alloc() argument
71 if (domain->efc->enable_ini) in efc_nport_alloc()
76 nport = efc_nport_find_wwn(domain, wwnn, wwpn); in efc_nport_alloc()
78 efc_log_err(domain->efc, in efc_nport_alloc()
93 nport->efc = domain->efc; in efc_nport_alloc()
95 nport->domain = domain; in efc_nport_alloc()
97 nport->instance_index = domain->nport_count++; in efc_nport_alloc()
105 memcpy(nport->service_params, domain->service_params, in efc_nport_alloc()
121 if (list_empty(&domain->nport_list)) in efc_nport_alloc()
122 domain->nport = nport; in efc_nport_alloc()
125 list_add_tail(&nport->list_entry, &domain->nport_list); in efc_nport_alloc()
127 kref_get(&domain->ref); in efc_nport_alloc()
129 efc_log_debug(domain->efc, "New Nport [%s]\n", nport->display_name); in efc_nport_alloc()
137 struct efc_domain *domain; in efc_nport_free() local
142 domain = nport->domain; in efc_nport_free()
143 efc_log_debug(domain->efc, "[%s] free nport\n", nport->display_name); in efc_nport_free()
149 if (nport == domain->nport) in efc_nport_free()
150 domain->nport = NULL; in efc_nport_free()
153 xa_erase(&domain->lookup, nport->fc_id); in efc_nport_free()
155 if (list_empty(&domain->nport_list)) in efc_nport_free()
156 efc_domain_post_event(domain, EFC_EVT_ALL_CHILD_NODES_FREE, in efc_nport_free()
159 kref_put(&domain->ref, domain->release); in efc_nport_free()
164 efc_nport_find(struct efc_domain *domain, u32 d_id) in efc_nport_find() argument
169 nport = xa_load(&domain->lookup, d_id); in efc_nport_find()
185 rc = xa_err(xa_store(&nport->domain->lookup, fc_id, nport, GFP_ATOMIC)); in efc_nport_attach()
275 struct efc_domain *domain = nport->domain; in __efc_nport_common() local
296 xa_erase(&domain->lookup, nport->fc_id); in __efc_nport_common()
324 struct efc_domain *domain = nport->domain; in __efc_nport_allocated() local
331 WARN_ON(nport != domain->nport); in __efc_nport_allocated()
366 if (efc_cmd_nport_alloc(efc, nport, nport->domain, in __efc_nport_vport_init()
543 struct efc_domain *domain = nport->domain; in __efc_nport_wait_shutdown() local
561 xa_erase(&domain->lookup, nport->fc_id); in __efc_nport_wait_shutdown()
598 efc_vport_nport_alloc(struct efc_domain *domain, struct efc_vport *vport) in efc_vport_nport_alloc() argument
602 lockdep_assert_held(&domain->efc->lock); in efc_vport_nport_alloc()
604 nport = efc_nport_alloc(domain, vport->wwpn, vport->wwnn, vport->fc_id, in efc_vport_nport_alloc()
621 efc_vport_start(struct efc_domain *domain) in efc_vport_start() argument
623 struct efc *efc = domain->efc; in efc_vport_start()
633 if (efc_vport_nport_alloc(domain, vport)) in efc_vport_start()
643 efc_nport_vport_new(struct efc_domain *domain, uint64_t wwpn, uint64_t wwnn, in efc_nport_vport_new() argument
647 struct efc *efc = domain->efc; in efc_nport_vport_new()
652 if (ini && domain->efc->enable_ini == 0) { in efc_nport_vport_new()
657 if (tgt && domain->efc->enable_tgt == 0) { in efc_nport_vport_new()
666 vport = efc_vport_create_spec(domain->efc, wwnn, wwpn, fc_id, ini, tgt, in efc_nport_vport_new()
674 rc = efc_vport_nport_alloc(domain, vport); in efc_nport_vport_new()
681 efc_nport_vport_del(struct efc *efc, struct efc_domain *domain, in efc_nport_vport_del() argument
700 if (!domain) { in efc_nport_vport_del()
706 list_for_each_entry(nport, &domain->nport_list, list_entry) { in efc_nport_vport_del()