Lines Matching refs:domain

43  * @defgroup domain Domain Functions
125 /* HW domain database operations */
1013 ocs_log_err(hw->os, "domain node memory allocation fail\n");
1018 ocs_log_err(hw->os, "domain fcf memory allocation fail\n");
2406 hw->callback.domain = func;
2407 hw->args.domain = arg;
2442 * @param sport SLI port object used to connect to the domain.
2443 * @param domain Domain object associated with this port (may be NULL).
2449 ocs_hw_port_alloc(ocs_hw_t *hw, ocs_sli_port_t *sport, ocs_domain_t *domain,
2478 if (domain != NULL) {
2503 /* domain NULL and wwpn non-NULL */
2519 * @brief Attach a physical/virtual SLI port to a domain.
2738 * @param sport SLI port object used to connect to the domain.
2767 * @ingroup domain
2768 * @brief Allocate a fabric domain object.
2771 * This function starts a series of commands needed to connect to the domain, including
2781 * @param domain Pointer to the domain object.
2788 ocs_hw_domain_alloc(ocs_hw_t *hw, ocs_domain_t *domain, uint32_t fcf, uint32_t vlan)
2793 if (!hw || !domain || !domain->sport) {
2794 ocs_log_err(NULL, "bad parameter(s) hw=%p domain=%p sport=%p\n",
2795 hw, domain, domain ? domain->sport : NULL);
2813 domain->dma = hw->domain_dmem;
2815 domain->hw = hw;
2816 domain->sm.app = domain;
2817 domain->fcf = fcf;
2818 domain->fcf_indicator = UINT32_MAX;
2819 domain->vlan_id = vlan;
2820 domain->indicator = UINT32_MAX;
2822 if (sli_resource_alloc(&hw->sli, SLI_RSRC_FCOE_VFI, &domain->indicator, &index)) {
2830 ocs_sm_transition(&domain->sm, __ocs_hw_domain_init, cmd);
2835 * @ingroup domain
2836 * @brief Attach a SLI port to a domain.
2839 * @param domain Pointer to the domain object.
2845 ocs_hw_domain_attach(ocs_hw_t *hw, ocs_domain_t *domain, uint32_t fc_id)
2850 if (!hw || !domain) {
2852 "bad parameter(s) hw=%p domain=%p\n",
2853 hw, domain);
2871 domain->sport->fc_id = fc_id;
2872 ocs_sm_post_event(&domain->sm, OCS_EVT_HW_DOMAIN_REQ_ATTACH, buf);
2877 * @ingroup domain
2878 * @brief Free a fabric domain object.
2881 * Free both the driver and SLI port resources associated with the domain.
2884 * @param domain Pointer to the domain object.
2889 ocs_hw_domain_free(ocs_hw_t *hw, ocs_domain_t *domain)
2893 if (!hw || !domain) {
2895 "bad parameter(s) hw=%p domain=%p\n",
2896 hw, domain);
2908 ocs_sm_post_event(&domain->sm, OCS_EVT_HW_DOMAIN_REQ_FREE, NULL);
2913 * @ingroup domain
2914 * @brief Free a fabric domain object.
2917 * Free the driver resources associated with the domain. The difference between
2922 * @param domain Pointer to the domain object.
2927 ocs_hw_domain_force_free(ocs_hw_t *hw, ocs_domain_t *domain)
2929 if (!hw || !domain) {
2930 ocs_log_err(NULL, "bad parameter(s) hw=%p domain=%p\n", hw, domain);
2934 sli_resource_free(&hw->sli, SLI_RSRC_FCOE_VFI, domain->indicator);
8239 ocs_hw_domain_add(ocs_hw_t *hw, ocs_domain_t *domain)
8244 if ((hw == NULL) || (domain == NULL)) {
8245 ocs_log_err(NULL, "bad parameter hw=%p domain=%p\n",
8246 hw, domain);
8250 fcfi = domain->fcf_indicator;
8255 ocs_log_debug(hw->os, "adding domain %p @ %#x\n",
8256 domain, fcfi);
8257 hw->domains[fcfi] = domain;
8266 fcf_index = domain->fcf;
8287 ocs_hw_domain_del(ocs_hw_t *hw, ocs_domain_t *domain)
8292 if ((hw == NULL) || (domain == NULL)) {
8293 ocs_log_err(NULL, "bad parameter hw=%p domain=%p\n",
8294 hw, domain);
8298 fcfi = domain->fcf_indicator;
8303 ocs_log_debug(hw->os, "deleting domain %p @ %#x\n",
8304 domain, fcfi);
8306 if (domain != hw->domains[fcfi]) {
8307 ocs_log_test(hw->os, "provided domain %p does not match stored domain %p\n",
8308 domain, hw->domains[fcfi]);
8321 fcf_index = domain->fcf;
9189 if (hw->callback.domain != NULL) {
9194 * This is a pseudo FCF entry. Create a domain
9223 hw->callback.domain(hw->args.domain,
9305 hw->callback.domain != NULL) {
9306 hw->callback.domain(hw->args.domain, OCS_HW_DOMAIN_LOST, d);
9322 ocs_domain_t *domain = NULL;
9325 /* Find the associated domain object */
9339 domain = d;
9344 if (domain != NULL) {
9350 domain = ocs_hw_domain_get_indexed(hw, event->index);
9358 if (domain != NULL &&
9359 hw->callback.domain != NULL) {
9360 hw->callback.domain(hw->args.domain, OCS_HW_DOMAIN_LOST, domain);
9364 if (domain != NULL &&
9365 hw->callback.domain != NULL) {
9367 * We will want to issue rediscover FCF when this domain is free'd in order
9370 domain->req_rediscover_fcf = TRUE;
9371 hw->callback.domain(hw->args.domain, OCS_HW_DOMAIN_LOST, domain);
9375 if (domain != NULL &&
9376 hw->callback.domain != NULL) {
9377 hw->callback.domain(hw->args.domain, OCS_HW_DOMAIN_LOST, domain);
10282 /* physical port attached (as part of attaching domain) */
10460 sport->indicator, sport->domain->indicator)) {
10551 ocs_domain_t *domain = ctx->app;
10552 ocs_hw_t *hw = domain->hw;
10554 smtrace("domain");
10572 ocs_domain_t *domain = ctx->app;
10573 ocs_hw_t *hw = domain->hw;
10575 smtrace("domain");
10584 sli_resource_free(&hw->sli, SLI_RSRC_FCOE_VFI, domain->indicator);
10587 if (hw->callback.domain != NULL) {
10588 hw->callback.domain(hw->args.domain,
10590 domain);
10604 ocs_domain_t *domain = ctx->app;
10605 ocs_hw_t *hw = domain->hw;
10607 smtrace("domain");
10613 ocs_sm_post_event(&domain->sport->ctx, OCS_EVT_HW_PORT_ATTACH_OK, NULL);
10616 if (hw->callback.domain != NULL) {
10617 hw->callback.domain(hw->args.domain,
10619 domain);
10636 ocs_domain_t *domain = ctx->app;
10637 ocs_hw_t *hw = domain->hw;
10639 smtrace("domain");
10647 sli_resource_free(&hw->sli, SLI_RSRC_FCOE_VFI, domain->indicator);
10650 if (hw->callback.domain != NULL) {
10651 hw->callback.domain(hw->args.domain,
10653 domain);
10669 ocs_domain_t *domain = ctx->app;
10670 ocs_hw_t *hw = domain->hw;
10672 smtrace("domain");
10677 ocs_display_sparams("", "reg vpi", 0, NULL, domain->dma.virt);
10679 if (0 == sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, domain)) {
10685 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
10708 ocs_domain_t *domain = ctx->app;
10709 ocs_hw_t *hw = domain->hw;
10711 smtrace("domain");
10717 ocs_sm_post_event(&domain->sport->ctx, OCS_EVT_HW_PORT_ALLOC_OK, NULL);
10719 ocs_hw_domain_add(hw, domain);
10722 if (hw->callback.domain != NULL) {
10723 hw->callback.domain(hw->args.domain,
10725 domain);
10750 ocs_domain_t *domain = ctx->app;
10751 ocs_hw_t *hw = domain->hw;
10753 smtrace("domain");
10758 &domain->dma, SLI4_READ_SPARM64_VPI_DEFAULT)) {
10764 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
10773 ocs_display_sparams(domain->display_name, "domain sparm64", 0, NULL, domain->dma.virt);
10791 ocs_domain_t *domain = ctx->app;
10792 ocs_sli_port_t *sport = domain->sport;
10793 ocs_hw_t *hw = domain->hw;
10795 smtrace("domain");
10799 if (0 == sli_cmd_init_vfi(&hw->sli, data, SLI4_BMBX_SIZE, domain->indicator,
10800 domain->fcf_indicator, sport->indicator)) {
10805 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
10830 ocs_domain_t *domain = ctx->app;
10831 ocs_hw_t *hw = domain->hw;
10833 smtrace("domain");
10865 domain->vlan_id, domain->fcf)) {
10872 if (0 == sli_cmd_reg_fcfi(&hw->sli, data, SLI4_BMBX_SIZE, domain->fcf,
10873 rq_cfg, domain->vlan_id)) {
10880 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
10895 domain->fcf_indicator = ((sli4_cmd_reg_fcfi_t *)data)->fcfi;
10922 ocs_domain_t *domain = ctx->app;
10923 ocs_hw_t *hw = domain->hw;
10925 smtrace("domain");
10932 * Copy FCF information into the domain and jump to INIT_VFI
10934 domain->fcf_indicator = hw->fcf_indicator;
10935 ocs_sm_transition(&domain->sm, __ocs_hw_domain_alloc_init_vfi, data);
10937 ocs_sm_transition(&domain->sm, __ocs_hw_domain_alloc_reg_fcfi, data);
10951 ocs_domain_t *domain = ctx->app;
10953 smtrace("domain");
10957 if (domain != NULL) {
10958 ocs_hw_t *hw = domain->hw;
10960 ocs_hw_domain_del(hw, domain);
10962 if (hw->callback.domain != NULL) {
10963 hw->callback.domain(hw->args.domain,
10965 domain);
10971 ocs_free(domain != NULL ? domain->hw->os : NULL, data, SLI4_BMBX_SIZE);
10987 ocs_domain_t *domain = ctx->app;
10989 smtrace("domain");
10994 if (domain != NULL) {
10995 ocs_hw_t *hw = domain->hw;
10999 domain->indicator);
11001 ocs_hw_domain_del(hw, domain);
11004 if (hw->callback.domain != NULL) {
11005 hw->callback.domain(hw->args.domain,
11007 domain);
11028 ocs_domain_t *domain = ctx->app;
11029 ocs_hw_t *hw = domain->hw;
11031 smtrace("domain");
11040 if (0 == sli_cmd_fcoe_rediscover_fcf(&hw->sli, data, SLI4_BMBX_SIZE, domain->fcf)) {
11046 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
11069 ocs_domain_t *domain = ctx->app;
11070 ocs_hw_t *hw = domain->hw;
11072 smtrace("domain");
11084 if (0 == sli_cmd_unreg_fcfi(&hw->sli, data, SLI4_BMBX_SIZE, domain->fcf_indicator)) {
11091 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
11099 if (domain->req_rediscover_fcf) {
11100 domain->req_rediscover_fcf = FALSE;
11122 ocs_domain_t *domain = ctx->app;
11123 ocs_hw_t *hw = domain->hw;
11126 smtrace("domain");
11140 if (0 == sli_cmd_unreg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, domain,
11148 if (ocs_hw_command(hw, data, OCS_CMD_NOWAIT, __ocs_hw_domain_cb, domain)) {
11177 /* callback for domain alloc/attach/free */
11181 ocs_domain_t *domain = arg;
11187 domain->indicator, status, hdr->status);
11193 ocs_sm_post_event(&domain->sm, evt, mqe);
12099 * - @ref domain
12115 * <ul><li>domain ��� This function is called whenever a domain event is generated
12117 * to a domain is disrupted, and allocation callbacks.</li>
12133 * <li>Allocating and using the common objects (SLI Port, domain, remote node).</li>
12155 * When the link comes up, the HW determines if a domain is present and notifies the
12156 * driver using the domain callback function. This is the starting point of the driver's
12158 * @b Note: For FCoE, there may be more than one domain available and, therefore,
12170 * <li>SCSI domain ��� the ocs_domain_t object represents the SCSI domain, including
12171 * any infrastructure devices such as FC switches and FC forwarders. The domain
12174 * the driver and the SCSI domain. The SLI Port object contains a VPI.</li>
12176 * Port and another device in the SCSI domain. The node object contains an RPI.</li></ul>
12178 * Before the driver can send I/Os, it must allocate the SCSI domain, SLI Port, and remote
12180 * connect the driver to the SCSI domain to exchange I/Os with other devices. These
12185 * The first step is to create a connection to the domain by allocating an SLI Port object.
12187 * the SLI Port object, the driver can discover the available SCSI domain(s). On identifying
12188 * a domain, the driver allocates a domain object and attaches to it using the previous SLI
12192 * FLOGI) with the domain before attaching.<br><br>
12194 * Once attached to the domain, the driver can discover and attach to other devices
12204 * nodes in the domain. Therefore, the driver must allocate node objects prior to
12274 HW_WORKAROUND_OVERRIDE_FCFI_IN_SRB, /**< FCFI reported in SRB not correct, use "first" registered domain */