Lines Matching refs:domain

132 			      nport->indicator, nport->domain->indicator);
207 struct efc_domain *domain, u8 *wwpn)
227 if (domain) {
237 /* domain NULL and wwpn non-NULL */
278 nport->domain->indicator, false);
317 efc_domain_get_mbox_status(struct efc_domain *domain, u8 *mqe, int status)
319 struct efc *efc = domain->efc;
325 domain->indicator, status,
334 efc_domain_free_resources(struct efc_domain *domain, int evt, void *data)
336 struct efc *efc = domain->efc;
339 if (domain->dma.virt) {
341 domain->dma.size, domain->dma.virt,
342 domain->dma.phys);
343 memset(&domain->dma, 0, sizeof(struct efc_dma));
347 sli_resource_free(efc->sli, SLI4_RSRC_VFI, domain->indicator);
349 efc_domain_cb(efc, evt, domain);
353 efc_domain_send_nport_evt(struct efc_domain *domain,
356 struct efc *efc = domain->efc;
359 efc_nport_send_evt(domain->nport, port_evt, NULL);
362 efc_domain_cb(efc, domain_evt, domain);
369 struct efc_domain *domain = arg;
371 if (efc_domain_get_mbox_status(domain, mqe, status)) {
372 efc_domain_free_resources(domain,
377 efc_domain_send_nport_evt(domain, EFC_EVT_NPORT_ALLOC_OK,
383 efc_domain_alloc_read_sparm64(struct efc_domain *domain)
385 struct efc *efc = domain->efc;
389 rc = sli_cmd_read_sparm64(efc->sli, data, &domain->dma, 0);
392 efc_domain_free_resources(domain,
398 efc_domain_alloc_read_sparm64_cb, domain);
401 efc_domain_free_resources(domain,
410 struct efc_domain *domain = arg;
412 if (efc_domain_get_mbox_status(domain, mqe, status)) {
413 efc_domain_free_resources(domain,
418 efc_domain_alloc_read_sparm64(domain);
423 efc_domain_alloc_init_vfi(struct efc_domain *domain)
425 struct efc *efc = domain->efc;
426 struct efc_nport *nport = domain->nport;
432 * Copy FCF information into the domain and jump to INIT_VFI.
434 domain->fcf_indicator = efc->fcfi;
435 rc = sli_cmd_init_vfi(efc->sli, data, domain->indicator,
436 domain->fcf_indicator, nport->indicator);
439 efc_domain_free_resources(domain,
446 efc_domain_alloc_init_vfi_cb, domain);
449 efc_domain_free_resources(domain,
455 efc_cmd_domain_alloc(struct efc *efc, struct efc_domain *domain, u32 fcf)
459 if (!domain || !domain->nport) {
460 efc_log_err(efc, "bad parameter(s) domain=%p nport=%p\n",
461 domain, domain ? domain->nport : NULL);
466 domain->dma.size = EFC_SPARAM_DMA_SZ;
467 domain->dma.virt = dma_alloc_coherent(&efc->pci->dev,
468 domain->dma.size,
469 &domain->dma.phys, GFP_KERNEL);
470 if (!domain->dma.virt) {
475 domain->fcf = fcf;
476 domain->fcf_indicator = U32_MAX;
477 domain->indicator = U32_MAX;
479 if (sli_resource_alloc(efc->sli, SLI4_RSRC_VFI, &domain->indicator,
484 domain->dma.size, domain->dma.virt,
485 domain->dma.phys);
486 memset(&domain->dma, 0, sizeof(struct efc_dma));
491 efc_domain_alloc_init_vfi(domain);
499 struct efc_domain *domain = arg;
501 if (efc_domain_get_mbox_status(domain, mqe, status)) {
502 efc_domain_free_resources(domain,
507 efc_domain_send_nport_evt(domain, EFC_EVT_NPORT_ATTACH_OK,
513 efc_cmd_domain_attach(struct efc *efc, struct efc_domain *domain, u32 fc_id)
518 if (!domain) {
519 efc_log_err(efc, "bad param(s) domain=%p\n", domain);
523 domain->nport->fc_id = fc_id;
525 rc = sli_cmd_reg_vfi(efc->sli, buf, SLI4_BMBX_SIZE, domain->indicator,
526 domain->fcf_indicator, domain->dma,
527 domain->nport->indicator, domain->nport->sli_wwpn,
528 domain->nport->fc_id);
535 efc_domain_attach_reg_vfi_cb, domain);
544 efc_domain_free_resources(domain, EFC_HW_DOMAIN_ATTACH_FAIL, buf);
552 struct efc_domain *domain = arg;
556 rc = efc_domain_get_mbox_status(domain, mqe, status);
562 efc_domain_free_resources(domain, evt, mqe);
567 efc_domain_free_unreg_vfi(struct efc_domain *domain)
569 struct efc *efc = domain->efc;
573 rc = sli_cmd_unreg_vfi(efc->sli, data, domain->indicator,
581 efc_domain_free_unreg_vfi_cb, domain);
590 efc_domain_free_resources(domain, EFC_HW_DOMAIN_FREE_FAIL, data);
594 efc_cmd_domain_free(struct efc *efc, struct efc_domain *domain)
596 if (!domain) {
597 efc_log_err(efc, "bad parameter(s) domain=%p\n", domain);
601 efc_domain_free_unreg_vfi(domain);