1 /* QLogic qed NIC Driver
2 * Copyright (c) 2015 QLogic Corporation
4 * This software is available under the terms of the GNU General Public License
5 * (GPL) Version 2, available from the file COPYING in the main directory of
12 #include <linux/types.h>
13 #include <linux/slab.h>
14 #include <linux/qed/qed_if.h>
21 enum protocol_type type;
25 * @brief qed_cxt_acquire - Acquire a new cid of a specific protocol type
33 int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
34 enum protocol_type type,
38 * @brief qedo_cid_get_cxt_info - Returns the context info for a specific cid
42 * @param p_info in/out
46 int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn,
47 struct qed_cxt_info *p_info);
49 enum qed_cxt_elem_type {
54 u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
55 enum protocol_type type, u32 *vf_cid);
58 * @brief qed_cxt_set_pf_params - Set the PF params for cxt init
64 int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn);
67 * @brief qed_cxt_cfg_ilt_compute - compute ILT init parameters
73 int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn);
76 * @brief qed_cxt_mngr_alloc - Allocate and init the context manager struct
82 int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn);
85 * @brief qed_cxt_mngr_free
89 void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn);
92 * @brief qed_cxt_tables_alloc - Allocate ILT shadow, Searcher T2, acquired map
98 int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn);
101 * @brief qed_cxt_mngr_setup - Reset the acquired CIDs
105 void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn);
108 * @brief qed_cxt_hw_init_common - Initailze ILT and DQ, common phase, per path.
114 void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn);
117 * @brief qed_cxt_hw_init_pf - Initailze ILT and DQ, PF phase, per path.
123 void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn);
126 * @brief qed_qm_init_pf - Initailze the QM PF phase, per path
131 void qed_qm_init_pf(struct qed_hwfn *p_hwfn);
134 * @brief qed_cxt_release - Release a cid
139 void qed_cxt_release_cid(struct qed_hwfn *p_hwfn,