Lines Matching +full:a +full:- +full:hlm
1 /*-
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * Define common SLI-4 structures and function prototypes.
43 #define SLI_SUB_PAGE_MASK (SLI_PAGE_SIZE - 1)
53 uint32_t mask = page_size - 1; in sli_page_count()
93 * Common SLI-4 register offsets and field definitions
97 * @brief SLI_INTF - SLI Interface Definition Register
119 * @brief ASIC_ID - SLI ASIC Type and Revision Register
135 * @brief BMBX - Bootstrap Mailbox Register
150 * @brief EQCQ_DOORBELL - EQ and CQ Doorbell Register
168 * @brief SLIPORT_CONTROL - SLI Port Control Register
179 * @brief SLI4_SLIPORT_ERROR1 - SLI Port Error Register
184 * @brief SLI4_SLIPORT_ERROR2 - SLI Port Error Register
225 eq_doorbell->eq_id_lo = id & SLI4_EQCQ_EQ_ID_MASK_LO; in sli_eq_doorbell()
226 eq_doorbell->qt = 1; /* EQ is type 1 (section 2.2.3.3 SLI Arch) */ in sli_eq_doorbell()
227 eq_doorbell->eq_id_hi = (id >> 9) & 0x1f; in sli_eq_doorbell()
228 eq_doorbell->number_popped = n_popped; in sli_eq_doorbell()
229 eq_doorbell->arm = arm; in sli_eq_doorbell()
230 eq_doorbell->ci = TRUE; in sli_eq_doorbell()
252 cq_doorbell->cq_id_lo = id & SLI4_EQCQ_CQ_ID_MASK_LO; in sli_cq_doorbell()
253 cq_doorbell->qt = 0; /* CQ is type 0 (section 2.2.3.3 SLI Arch) */ in sli_cq_doorbell()
254 cq_doorbell->cq_id_hi = (id >> 10) & 0x1f; in sli_cq_doorbell()
255 cq_doorbell->number_popped = n_popped; in sli_cq_doorbell()
256 cq_doorbell->arm = arm; in sli_cq_doorbell()
277 eq_doorbell->eq_id = id; in sli_iftype6_eq_doorbell()
278 eq_doorbell->number_popped = n_popped; in sli_iftype6_eq_doorbell()
279 eq_doorbell->arm = arm; in sli_iftype6_eq_doorbell()
299 cq_doorbell->cq_id = id; in sli_iftype6_cq_doorbell()
300 cq_doorbell->number_popped = n_popped; in sli_iftype6_cq_doorbell()
301 cq_doorbell->arm = arm; in sli_iftype6_cq_doorbell()
307 * @brief MQ_DOORBELL - MQ Doorbell Register
318 * @brief RQ_DOORBELL - RQ Doorbell Register
329 * @brief WQ_DOORBELL - WQ Doorbell Register
343 * @brief SLIPORT_SEMAPHORE - SLI Port Host and Port Status Register
368 * @brief SLIPORT_STATUS - SLI Port Status Register
394 * SLI-4 mailbox command formats and definitions
468 #define SLI4_BDE_TYPE_BDE_64 0x00 /** Generic 64-bit data */
473 * @brief Scatter-Gather Entry (SGE)
489 * @brief T10 DIF Scatter-Gather Entry (SGE)
505 * @brief T10 DIF Seed Scatter-Gather Entry (SGE)
539 * @brief List Segment Pointer Scatter-Gather Entry (SGE)
578 #define OCS_MAX_SGE_SIZE 0x80000000 /* Maximum data allowed in a SGE */
586 uint32_t maxbbc:8, /** Max buffer-to-buffer credit */
599 bbscn:4, /** buffer-to-buffer state change number */
627 * @brief FW_INITIALIZE - initialize a SLI port
629 * @note This command uses a different format than all others.
635 * @brief FW_DEINITIALIZE - deinitialize a SLI port
637 * @note This command uses a different format than all others.
643 * @brief INIT_LINK - initialize the link for a FC/FCoE port
711 * @brief INIT_VFI - initialize the VFI resource
735 * @brief INIT_VPI - initialize the VPI resource
748 * @brief POST_XRI - post XRI resources to the SLI Port
765 * @brief RELEASE_XRI - Release XRI resources from the SLI Port
784 * @brief READ_CONFIG - read SLI port configuration parameters
834 #define SLI4_READ_CFG_TOPO_FC_DA 0x2 /** FC Direct Attach (non FC-AL) topology */
835 #define SLI4_READ_CFG_TOPO_FC_AL 0x3 /** FC-AL topology */
838 * @brief READ_NVPARMS - read SLI port configuration parameters
857 * @brief WRITE_NVPARMS - write SLI port configuration parameters
876 * @brief READ_REV - read the Port revision levels
914 * @brief READ_SPARM64 - read the Port service parameters
954 * @brief READ_TOPOLOGY - read the link event information
1011 * @brief REG_FCFI - activate a FC Forwarder
1074 * @brief REG_RPI - register a Remote Port Indicator
1099 * @brief REG_VFI - register a Virtual Fabric Indicator
1123 * @brief REG_VPI - register a Virtual Port Indicator
1142 * @brief REQUEST_FEATURES - request / query SLI features
1147 uint32_t iaab:1, /** inhibit auto-ABTS originator */
1156 iaar:1, /** inhibit auto-ABTS responder */
1157 hlm:1, /** High Login Mode */
1185 * @brief SLI_CONFIG - submit a configuration command to Port
1188 * in a separate memory buffer (mem)
1219 * @brief READ_STATUS - read tx/rx status of a particular port
1250 * @brief READ_LNK_STAT - read link status of a particular port
1309 * @brief Format a WQE with WQ_ID Association performance hint
1312 * PHWQ works by over-writing part of Word 10 in the WQE with the WQ ID.
1337 * @brief UNREG_FCFI - unregister a FCFI
1351 * @brief UNREG_RPI - unregister one or more RPI
1373 * @brief UNREG_VFI - unregister one or more VFI
1398 * @brief UNREG_VPI - unregister one or more VPI
1417 * @brief AUTO_XFER_RDY - Configure the auto-generate XFER-RDY feature.
1444 * SLI-4 common configuration command formats and definitions
1553 * Resets the Port, returning it to a power-on state. This configuration
1554 * command does not have a payload and should set/expect the lengths to
1568 * Create a Completion Queue.
1600 * Create a Completion Queue.
1636 * Create a set of Completion Queues.
1794 * Create a Mailbox Queue; accommodate v0 and v1 forms.
2103 hlm:1, member
2385 * by the SFF-8472 specification).
2576 agxfe:1, /*<< Auto Generate XFER-RDY Feature Enabled */
2808 to pick a number that we think will be big enough and ask for that
2975 * A CQE generated on the completion of a MQE from a MQ.
2984 con:1, /** consumed - command now being executed */
2985 cmp:1, /** completed - command still executing if clear */
2987 ae:1, /** async event - this is an ACQE */
2988 val:1; /** valid - contents of CQE are valid */
2997 * A CQE generated asynchronously in response to the link or other internal events.
3006 ae:1, /** async event - this is an ACQE */
3007 val:1; /** valid - contents of CQE are valid */
3097 of the queue, a queue entry is valid when a cqe valid
3104 is_hdr:1,/** is a RQ for packet headers */
3113 ocs_lock(&q->lock); in sli_queue_lock()
3119 ocs_unlock(&q->lock); in sli_queue_unlock()
3140 SLI_LINK_TOPO_NPORT = 1, /** fabric or point-to-point */
3262 * a single large extent.
3303 /* Save pointer to physical memory descriptor for non-embedded SLI_CONFIG
3324 return sli4->config.extent[rsrc].size; in sli_get_max_rsrc()
3333 return sli4->config.max_qcount[qtype]; in sli_get_max_queue()
3340 return sli4->config.max_qentries[qtype]; in sli_get_max_qentries()
3346 return sli4->config.sge_supported_length; in sli_get_max_sge()
3353 if (sli4->config.sgl_page_sizes != 1) { in sli_get_max_sgl()
3354 ocs_log_test(sli4->os, "unsupported SGL page sizes %#x\n", in sli_get_max_sgl()
3355 sli4->config.sgl_page_sizes); in sli_get_max_sgl()
3359 return ((sli4->config.max_sgl_pages * SLI_PAGE_SIZE) / sizeof(sli4_sge_t)); in sli_get_max_sgl()
3365 switch (sli4->config.topology) { in sli_get_medium()
3380 sli4_sgl_chaining_params_t *cparms = &sli4->config.sgl_chaining_params; in sli_skh_chain_sge_build()
3383 sge->sge_type = SLI4_SGE_TYPE_CHAIN; in sli_skh_chain_sge_build()
3384 sge->buffer_address_high = (uint32_t)cparms->chain_sge_initial_value_hi; in sli_skh_chain_sge_build()
3385 sge->buffer_address_low = in sli_skh_chain_sge_build()
3386 (uint32_t)((cparms->chain_sge_initial_value_lo | in sli_skh_chain_sge_build()
3387 (((uintptr_t)(xri_index & cparms->sgl_index_field_mask)) << in sli_skh_chain_sge_build()
3388 cparms->sgl_index_field_offset) | in sli_skh_chain_sge_build()
3389 (((uintptr_t)(frag_num & cparms->frag_num_field_mask)) << in sli_skh_chain_sge_build()
3390 cparms->frag_num_field_offset) | in sli_skh_chain_sge_build()
3397 return sli4->sli_rev; in sli_get_sli_rev()
3403 return sli4->sli_family; in sli_get_sli_family()
3409 return sli4->if_type; in sli_get_if_type()
3415 return sli4->config.wwpn; in sli_get_wwn_port()
3421 return sli4->config.wwnn; in sli_get_wwn_node()
3427 return sli4->vpd.data.virt; in sli_get_vpd()
3433 return sli4->vpd.length; in sli_get_vpd_len()
3439 return sli4->config.fw_rev[which]; in sli_get_fw_revision()
3445 return sli4->config.fw_name[which]; in sli_get_fw_name()
3451 return sli4->config.ipl_name; in sli_get_ipl_name()
3457 return sli4->config.hw_rev[which]; in sli_get_hw_revision()
3463 return sli4->config.auto_xfer_rdy; in sli_get_auto_xfer_rdy_capable()
3469 return sli4->config.features.flag.dif; in sli_get_dif_capable()
3475 return sli_get_dif_capable(sli4) && sli4->config.t10_dif_inline_capable; in sli_is_dif_inline_capable()
3481 return sli_get_dif_capable(sli4) && sli4->config.t10_dif_separate_capable; in sli_is_dif_separate_capable()
3487 return sli4->config.dual_ulp_capable; in sli_get_is_dual_ulp_capable()
3493 return sli4->config.sgl_chaining_params.chaining_capable; in sli_get_is_sgl_chaining_capable()
3499 return sli4->config.is_ulp_fc[ulp]; in sli_get_is_ulp_enabled()
3505 return sli4->config.features.flag.hlm; in sli_get_hlm_capable()
3511 if (value && !sli4->config.features.flag.hlm) { in sli_set_hlm()
3512 ocs_log_test(sli4->os, "HLM not supported\n"); in sli_set_hlm()
3513 return -1; in sli_set_hlm()
3516 sli4->config.high_login_mode = value != 0 ? TRUE : FALSE; in sli_set_hlm()
3524 return sli4->config.high_login_mode; in sli_get_hlm()
3530 return sli4->config.sgl_pre_registration_required; in sli_get_sgl_preregister_required()
3536 return sli4->config.sgl_pre_registered; in sli_get_sgl_preregister()
3542 if ((value == 0) && sli4->config.sgl_pre_registration_required) { in sli_set_sgl_preregister()
3543 ocs_log_test(sli4->os, "SGL pre-registration required\n"); in sli_set_sgl_preregister()
3544 return -1; in sli_set_sgl_preregister()
3547 sli4->config.sgl_pre_registered = value != 0 ? TRUE : FALSE; in sli_set_sgl_preregister()
3555 return sli4->asic_type; in sli_get_asic_type()
3561 return sli4->asic_rev; in sli_get_asic_rev()
3574 sli4->config.topology = value; in sli_set_topology()
3577 ocs_log_test(sli4->os, "unsupported topology %#x\n", value); in sli_set_topology()
3578 rc = -1; in sli_set_topology()
3587 sli4->config.pt = req->persistent_topo; in sli_config_persistent_topology()
3588 sli4->config.tf = req->topo_failover; in sli_config_persistent_topology()
3594 return sli4->config.link_module_type; in sli_get_link_module_type()
3600 return sli4->config.port_name; in sli_get_portnum()
3606 return sli4->config.bios_version_string; in sli_get_bios_version_string()
3630 ocs_log_err(NULL, "unsupported FC-AL speed (speed_code: %d)\n", link_speed); in sli_fcal_is_speed_supported()
3770 * @brief Maximum value for a FCFI
3772 * Note that although most commands provide a 16 bit field for the FCFI,
3782 * The SLI-4 specification uses a 16 bit field in most places for the FCF
3789 * SLI-4 FC/FCoE mailbox command formats and definitions.
3815 * Create a Work Queue for FC/FCoE use.
3839 * Create a version 1 Work Queue for FC/FCoE use.
3898 * Create a Receive Queue for FC/FCoE use.
3928 * Create a version 1 Receive Queue for FC/FCoE use.
3955 * Create a version 2 Receive Queue for FC/FCoE use.
4017 * Retrieve a FCF database (also known as a table) entry created by the SLI Port
4030 /* A FCF index of -1 on the request means return the first valid entry */
4076 /* A next FCF index of -1 in the response means this is the last valid entry */
4183 hlm:1,
4304 hlm:1,
4381 hlm:1,
4439 hlm:1,
4494 hlm:1,
4532 * DWord 5 can either be the task retry identifier (HLM=0) or
4533 * the remote N_Port ID (HLM=1), or if implementing the Skyhawk
4534 * T10-PI workaround, the secondary xri tag
4565 hlm:1,
4599 * DWord 5 can either be the task retry identifier (HLM=0) or
4600 * the remote N_Port ID (HLM=1)
4627 hlm:1,
4661 * DWord 5 can either be the task retry identifier (HLM=0) or
4662 * the remote N_Port ID (HLM=1)
4689 hlm:1,
4714 #define SLI4_IO_AUTO_GOOD_RESPONSE BIT(1) /** Automatically generate a good RSP frame */
4725 * @brief WQE used to create a general request.
4756 hlm:1,
4783 * @brief WQE used to create a send frame request.
4811 hlm:1,
4834 * @brief WQE used to create a transmit sequence.
4872 hlm:1,
4928 hlm:1,
4954 * @brief WQE used to send a single frame sequence to broadcast address
4985 hlm:1,
5011 * @brief WQE used to create a BLS response.
5047 hlm:1,
5134 hlm:1,
5178 ae:1, /** async event - this is an ACQE */
5179 val:1; /** valid - contents of CQE are valid */
5221 ae:1, /** async event - this is an ACQE */
5222 val:1; /** valid - contents of CQE are valid */
5273 ae:1, /** async event - this is an ACQE */
5274 val:1; /** valid - contents of CQE are valid */
5620 * @return Returns 0 on success, or a non-zero value on failure.
5629 if (SLI4_FC_ASYNC_RQ_SUCCESS == rcqe->status) { in sli_fc_rqe_length()
5630 *len_hdr = rcqe->header_data_placement_length; in sli_fc_rqe_length()
5631 *len_data = rcqe->payload_data_placement_length; in sli_fc_rqe_length()
5634 return -1; in sli_fc_rqe_length()
5656 fcfi = rcqe->fcfi; in sli_fc_rqe_fcfi()
5661 fcfi = rcqev1->fcfi; in sli_fc_rqe_fcfi()
5666 fcfi = opt_wr->fcfi; in sli_fc_rqe_fcfi()