Lines Matching defs:nport
245 struct efc_nport *nport;
257 efc_log_debug(efc, "Create nport WWPN %016llX WWNN %016llX\n",
260 /* Allocate a nport and transition to __efc_nport_allocated */
261 nport = efc_nport_alloc(domain, my_wwpn, my_wwnn, U32_MAX,
264 if (!nport) {
268 efc_sm_transition(&nport->sm, __efc_nport_allocated, NULL);
270 bewwpn = cpu_to_be64(nport->wwpn);
275 if (efc_cmd_nport_alloc(efc, nport, NULL, (uint8_t *)&bewwpn)) {
277 efc_nport_free(nport);
310 nport->fc_id = drec->fc_id;
311 nport->topology = EFC_NPORT_TOPO_FC_AL;
312 snprintf(nport->display_name, sizeof(nport->display_name),
327 node = efc_node_alloc(nport,
367 struct efc_nport *nport;
369 nport = domain->nport;
370 if (WARN_ON(!nport))
373 sp = (struct fc_els_flogi *)nport->service_params;
378 memcpy(nport->service_params + 4, domain->dma.virt,
382 * Update the nport's service parameters,
385 sp->fl_wwpn = cpu_to_be64(nport->wwpn);
386 sp->fl_wwnn = cpu_to_be64(nport->wwnn);
405 __efc_domain_attach_internal(domain, nport->fc_id);
412 node = efc_node_find(nport, FC_FID_FLOGI);
418 node = efc_node_alloc(nport, FC_FID_FLOGI,
477 /* Update nport lookup */
478 rc = xa_err(xa_store(&domain->lookup, fc_id, domain->nport,
485 /* Update display name for the nport */
486 efc_node_fcid_display(fc_id, domain->nport->display_name,
487 sizeof(domain->nport->display_name));
515 * nport
517 struct efc_nport *nport = NULL, *nport_next = NULL;
521 list_for_each_entry_safe(nport, nport_next,
524 efc_sm_post_event(&nport->sm,
554 struct efc_nport *nport, *next_nport;
576 * Note: nport will have already received notification
577 * of nport attached as a result of the HW's port attach.
579 list_for_each_entry_safe(nport, next_nport,
581 xa_for_each(&nport->lookup, index, node) {
644 * and send shutdown to each nport
646 struct efc_nport *nport = NULL, *nport_next = NULL;
650 list_for_each_entry_safe(nport, nport_next,
653 efc_sm_post_event(&nport->sm,
685 WARN_ON(domain->nport->fc_id != fc_id);
791 * wait state and send shutdown to each nport
793 struct efc_nport *nport = NULL, *nport_next = NULL;
797 list_for_each_entry_safe(nport, nport_next,
800 efc_sm_post_event(&nport->sm,
944 struct efc_nport *nport = NULL;
961 nport = efc_nport_find(domain, d_id);
962 if (!nport) {
971 nport = domain->nport;
972 if (!nport || !kref_get_unless_zero(&nport->ref)) {
973 efc_log_err(efc, "Physical nport is NULL\n");
979 node = efc_node_find(nport, s_id);
993 node = efc_node_alloc(nport, s_id, false, false);
1016 kref_put(&nport->ref, nport->release);