Lines Matching refs:domain

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