Home
last modified time | relevance | path

Searched refs:p_hwfn (Results 1 – 21 of 21) sorted by relevance

/linux-4.4.14/drivers/net/ethernet/qlogic/qed/
Dqed_dev.c43 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_init_dp() local
45 p_hwfn->dp_level = dp_level; in qed_init_dp()
46 p_hwfn->dp_module = dp_module; in qed_init_dp()
55 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_init_struct() local
57 p_hwfn->cdev = cdev; in qed_init_struct()
58 p_hwfn->my_id = i; in qed_init_struct()
59 p_hwfn->b_active = false; in qed_init_struct()
61 mutex_init(&p_hwfn->dmae_info.mutex); in qed_init_struct()
71 static void qed_qm_info_free(struct qed_hwfn *p_hwfn) in qed_qm_info_free() argument
73 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_qm_info_free()
[all …]
Dqed_int.c42 #define SB_ATTN_ALIGNED_SIZE(p_hwfn) \ argument
43 ALIGNED_TYPE_SIZE(struct atten_status_block, p_hwfn)
62 static inline u16 qed_attn_update_idx(struct qed_hwfn *p_hwfn, in qed_attn_update_idx() argument
90 static int qed_int_assertion(struct qed_hwfn *p_hwfn, in qed_int_assertion() argument
93 struct qed_sb_attn_info *sb_attn_sw = p_hwfn->p_sb_attn; in qed_int_assertion()
97 igu_mask = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, in qed_int_assertion()
99 DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "IGU mask: 0x%08x --> 0x%08x\n", in qed_int_assertion()
102 qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE, igu_mask); in qed_int_assertion()
104 DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, in qed_int_assertion()
112 qed_mcp_handle_events(p_hwfn, p_hwfn->p_dpc_ptt); in qed_int_assertion()
[all …]
Dqed_mcp.c35 DRV_INNER_WR(p_hwfn, _p_ptt, drv_mb_addr, \
47 bool qed_mcp_is_init(struct qed_hwfn *p_hwfn) in qed_mcp_is_init() argument
49 if (!p_hwfn->mcp_info || !p_hwfn->mcp_info->public_base) in qed_mcp_is_init()
54 void qed_mcp_cmd_port_init(struct qed_hwfn *p_hwfn, in qed_mcp_cmd_port_init() argument
57 u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base, in qed_mcp_cmd_port_init()
59 u32 mfw_mb_offsize = qed_rd(p_hwfn, p_ptt, addr); in qed_mcp_cmd_port_init()
61 p_hwfn->mcp_info->port_addr = SECTION_ADDR(mfw_mb_offsize, in qed_mcp_cmd_port_init()
62 MFW_PORT(p_hwfn)); in qed_mcp_cmd_port_init()
63 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_mcp_cmd_port_init()
65 p_hwfn->mcp_info->port_addr, MFW_PORT(p_hwfn)); in qed_mcp_cmd_port_init()
[all …]
Dqed_hw.c44 int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn) in qed_ptt_pool_alloc() argument
63 p_hwfn->p_ptt_pool = p_pool; in qed_ptt_pool_alloc()
69 void qed_ptt_invalidate(struct qed_hwfn *p_hwfn) in qed_ptt_invalidate() argument
75 p_ptt = &p_hwfn->p_ptt_pool->ptts[i]; in qed_ptt_invalidate()
80 void qed_ptt_pool_free(struct qed_hwfn *p_hwfn) in qed_ptt_pool_free() argument
82 kfree(p_hwfn->p_ptt_pool); in qed_ptt_pool_free()
83 p_hwfn->p_ptt_pool = NULL; in qed_ptt_pool_free()
86 struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn) in qed_ptt_acquire() argument
93 spin_lock_bh(&p_hwfn->p_ptt_pool->lock); in qed_ptt_acquire()
95 if (!list_empty(&p_hwfn->p_ptt_pool->free_list)) { in qed_ptt_acquire()
[all …]
Dqed_cxt.c59 #define CONN_CXT_SIZE(p_hwfn) \ argument
60 ALIGNED_TYPE_SIZE(union conn_context, p_hwfn)
144 static void qed_cxt_qm_iids(struct qed_hwfn *p_hwfn, in qed_cxt_qm_iids() argument
147 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_qm_iids()
153 DP_VERBOSE(p_hwfn, QED_MSG_ILT, "iids: CIDS %08x\n", iids->cids); in qed_cxt_qm_iids()
157 static void qed_cxt_set_proto_cid_count(struct qed_hwfn *p_hwfn, in qed_cxt_set_proto_cid_count() argument
161 struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; in qed_cxt_set_proto_cid_count()
185 static void qed_ilt_cli_adv_line(struct qed_hwfn *p_hwfn, in qed_ilt_cli_adv_line() argument
201 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_cli_adv_line()
208 int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn) in qed_cxt_cfg_ilt_compute() argument
[all …]
Dqed_spq.c41 static void qed_spq_blocking_cb(struct qed_hwfn *p_hwfn, in qed_spq_blocking_cb() argument
57 static int qed_spq_block(struct qed_hwfn *p_hwfn, in qed_spq_block() argument
78 DP_INFO(p_hwfn, "Ramrod is stuck, requesting MCP drain\n"); in qed_spq_block()
79 rc = qed_mcp_drain(p_hwfn, p_hwfn->p_main_ptt); in qed_spq_block()
81 DP_NOTICE(p_hwfn, "MCP drain failed\n"); in qed_spq_block()
103 DP_NOTICE(p_hwfn, "Ramrod is stuck, MCP drain failed\n"); in qed_spq_block()
112 qed_spq_fill_entry(struct qed_hwfn *p_hwfn, in qed_spq_fill_entry() argument
125 DP_NOTICE(p_hwfn, "Unknown SPQE completion mode %d\n", in qed_spq_fill_entry()
130 DP_VERBOSE(p_hwfn, QED_MSG_SPQ, in qed_spq_fill_entry()
147 static void qed_spq_hw_initialize(struct qed_hwfn *p_hwfn, in qed_spq_hw_initialize() argument
[all …]
Dqed_init_fw_funcs.c123 static void qed_enable_pf_rl(struct qed_hwfn *p_hwfn, in qed_enable_pf_rl() argument
126 STORE_RT_REG(p_hwfn, QM_REG_RLPFENABLE_RT_OFFSET, pf_rl_en ? 1 : 0); in qed_enable_pf_rl()
129 STORE_RT_REG(p_hwfn, QM_REG_RLPFVOQENABLE_RT_OFFSET, in qed_enable_pf_rl()
132 STORE_RT_REG(p_hwfn, in qed_enable_pf_rl()
135 STORE_RT_REG(p_hwfn, in qed_enable_pf_rl()
140 STORE_RT_REG(p_hwfn, in qed_enable_pf_rl()
147 static void qed_enable_pf_wfq(struct qed_hwfn *p_hwfn, in qed_enable_pf_wfq() argument
150 STORE_RT_REG(p_hwfn, QM_REG_WFQPFENABLE_RT_OFFSET, pf_wfq_en ? 1 : 0); in qed_enable_pf_wfq()
153 STORE_RT_REG(p_hwfn, in qed_enable_pf_wfq()
159 static void qed_enable_vport_rl(struct qed_hwfn *p_hwfn, in qed_enable_vport_rl() argument
[all …]
Dqed_init_ops.c53 void qed_init_clear_rt_data(struct qed_hwfn *p_hwfn) in qed_init_clear_rt_data() argument
58 p_hwfn->rt_data[i].b_valid = false; in qed_init_clear_rt_data()
61 void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn, in qed_init_store_rt_reg() argument
65 p_hwfn->rt_data[rt_offset].init_val = val; in qed_init_store_rt_reg()
66 p_hwfn->rt_data[rt_offset].b_valid = true; in qed_init_store_rt_reg()
69 void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn, in qed_init_store_rt_agg() argument
77 p_hwfn->rt_data[rt_offset + i].init_val = val[i]; in qed_init_store_rt_agg()
78 p_hwfn->rt_data[rt_offset + i].b_valid = true; in qed_init_store_rt_agg()
82 static void qed_init_rt(struct qed_hwfn *p_hwfn, in qed_init_rt() argument
88 struct qed_rt_data *rt_data = p_hwfn->rt_data + rt_offset; in qed_init_rt()
[all …]
Dqed_int.h62 void qed_int_cau_conf_pi(struct qed_hwfn *p_hwfn,
76 void qed_int_igu_enable_int(struct qed_hwfn *p_hwfn,
86 void qed_int_igu_disable_int(struct qed_hwfn *p_hwfn,
97 u64 qed_int_igu_read_sisr_reg(struct qed_hwfn *p_hwfn);
116 int qed_int_sb_init(struct qed_hwfn *p_hwfn,
129 void qed_int_sb_setup(struct qed_hwfn *p_hwfn,
146 int qed_int_sb_release(struct qed_hwfn *p_hwfn,
168 int qed_int_get_num_sbs(struct qed_hwfn *p_hwfn,
187 #define SB_ALIGNED_SIZE(p_hwfn) \ argument
188 ALIGNED_TYPE_SIZE(struct status_block, p_hwfn)
[all …]
Dqed_sp_commands.c24 int qed_sp_init_request(struct qed_hwfn *p_hwfn, in qed_sp_init_request() argument
39 rc = qed_spq_get_entry(p_hwfn, pp_ent); in qed_sp_init_request()
74 DP_NOTICE(p_hwfn, "Unknown SPQE completion mode %d\n", in qed_sp_init_request()
79 DP_VERBOSE(p_hwfn, QED_MSG_SPQ, in qed_sp_init_request()
92 int qed_sp_pf_start(struct qed_hwfn *p_hwfn, in qed_sp_pf_start() argument
97 u16 sb = qed_int_get_sp_sb_id(p_hwfn); in qed_sp_pf_start()
98 u8 sb_index = p_hwfn->p_eq->eq_sb_index; in qed_sp_pf_start()
103 qed_eq_prod_update(p_hwfn, in qed_sp_pf_start()
104 qed_chain_get_prod_idx(&p_hwfn->p_eq->chain)); in qed_sp_pf_start()
110 rc = qed_sp_init_request(p_hwfn, in qed_sp_pf_start()
[all …]
Dqed_mcp.h126 *qed_mcp_get_link_capabilities(struct qed_hwfn *p_hwfn);
137 int qed_mcp_set_link(struct qed_hwfn *p_hwfn,
182 int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
196 int qed_mcp_drain(struct qed_hwfn *p_hwfn,
208 int qed_mcp_get_flash_size(struct qed_hwfn *p_hwfn,
223 qed_mcp_send_drv_version(struct qed_hwfn *p_hwfn,
233 #define MCP_PF_ID_BY_REL(p_hwfn, rel_pfid) (QED_IS_BB((p_hwfn)->cdev) ? \ argument
235 ((p_hwfn)->abs_pf_id & 1) << 3) : \
237 #define MCP_PF_ID(p_hwfn) MCP_PF_ID_BY_REL(p_hwfn, (p_hwfn)->rel_pf_id) argument
270 int qed_mcp_cmd_init(struct qed_hwfn *p_hwfn,
[all …]
Dqed_hw.h62 void qed_gtt_init(struct qed_hwfn *p_hwfn);
69 void qed_ptt_invalidate(struct qed_hwfn *p_hwfn);
78 int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn);
85 void qed_ptt_pool_free(struct qed_hwfn *p_hwfn);
95 u32 qed_ptt_get_hw_addr(struct qed_hwfn *p_hwfn,
115 void qed_ptt_set_win(struct qed_hwfn *p_hwfn,
127 struct qed_ptt *qed_get_reserved_ptt(struct qed_hwfn *p_hwfn,
138 void qed_wr(struct qed_hwfn *p_hwfn,
151 u32 qed_rd(struct qed_hwfn *p_hwfn,
165 void qed_memcpy_from(struct qed_hwfn *p_hwfn,
[all …]
Dqed_sp.h44 int qed_eth_cqe_completion(struct qed_hwfn *p_hwfn,
153 int qed_spq_post(struct qed_hwfn *p_hwfn,
164 int qed_spq_alloc(struct qed_hwfn *p_hwfn);
171 void qed_spq_setup(struct qed_hwfn *p_hwfn);
178 void qed_spq_free(struct qed_hwfn *p_hwfn);
192 qed_spq_get_entry(struct qed_hwfn *p_hwfn,
202 void qed_spq_return_entry(struct qed_hwfn *p_hwfn,
212 struct qed_eq *qed_eq_alloc(struct qed_hwfn *p_hwfn,
221 void qed_eq_setup(struct qed_hwfn *p_hwfn,
230 void qed_eq_free(struct qed_hwfn *p_hwfn,
[all …]
Dqed_l2.c135 static int qed_sp_vport_start(struct qed_hwfn *p_hwfn, in qed_sp_vport_start() argument
150 rc = qed_fw_vport(p_hwfn, vport_id, &abs_vport_id); in qed_sp_vport_start()
158 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_vport_start()
159 qed_spq_get_cid(p_hwfn), in qed_sp_vport_start()
184 p_ramrod->sw_fid = qed_concrete_to_sw_fid(p_hwfn->cdev, in qed_sp_vport_start()
187 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_vport_start()
191 qed_sp_vport_update_rss(struct qed_hwfn *p_hwfn, in qed_sp_vport_update_rss() argument
207 rc = qed_fw_rss_eng(p_hwfn, p_params->rss_eng_id, &rss->rss_id); in qed_sp_vport_update_rss()
242 DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP, in qed_sp_vport_update_rss()
250 rc = qed_fw_l2_queue(p_hwfn, in qed_sp_vport_update_rss()
[all …]
Dqed_cxt.h33 int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
46 int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn,
61 int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn);
70 int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn);
79 int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn);
86 void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn);
95 int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn);
102 void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn);
111 void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn);
120 void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn);
[all …]
Dqed_init_ops.h35 int qed_init_run(struct qed_hwfn *p_hwfn,
49 int qed_init_alloc(struct qed_hwfn *p_hwfn);
57 void qed_init_free(struct qed_hwfn *p_hwfn);
65 void qed_init_clear_rt_data(struct qed_hwfn *p_hwfn);
75 void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn,
94 void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn,
109 void qed_gtt_init(struct qed_hwfn *p_hwfn);
Dqed_dev_api.h106 void qed_hw_start_fastpath(struct qed_hwfn *p_hwfn);
145 struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn);
157 void qed_ptt_release(struct qed_hwfn *p_hwfn,
195 qed_dmae_host2grc(struct qed_hwfn *p_hwfn,
240 int qed_fw_l2_queue(struct qed_hwfn *p_hwfn,
253 int qed_fw_vport(struct qed_hwfn *p_hwfn,
266 int qed_fw_rss_eng(struct qed_hwfn *p_hwfn,
279 int qed_final_cleanup(struct qed_hwfn *p_hwfn,
Dqed_main.c538 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_nic_stop() local
540 if (p_hwfn->b_sp_dpc_enabled) { in qed_nic_stop()
541 tasklet_disable(p_hwfn->sp_dpc); in qed_nic_stop()
542 p_hwfn->b_sp_dpc_enabled = false; in qed_nic_stop()
545 i, p_hwfn->sp_dpc); in qed_nic_stop()
650 u32 qed_unzip_data(struct qed_hwfn *p_hwfn, u32 input_len, in qed_unzip_data() argument
655 p_hwfn->stream->next_in = input_buf; in qed_unzip_data()
656 p_hwfn->stream->avail_in = input_len; in qed_unzip_data()
657 p_hwfn->stream->next_out = unzip_buf; in qed_unzip_data()
658 p_hwfn->stream->avail_out = max_size; in qed_unzip_data()
[all …]
Dqed.h53 #define ALIGNED_TYPE_SIZE(type_name, p_hwfn) \ argument
54 ((sizeof(type_name) + (u32)(1 << (p_hwfn->cdev->cache_shift)) - 1) & \
55 ~((1 << (p_hwfn->cdev->cache_shift)) - 1))
409 #define IRO (p_hwfn->cdev->iro_arr)
491 u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
Dqed_hsi.h1602 struct qed_hwfn *p_hwfn,
1624 int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn,
1638 int qed_init_pf_rl(struct qed_hwfn *p_hwfn,
1654 int qed_init_vport_rl(struct qed_hwfn *p_hwfn,
1672 bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn,
/linux-4.4.14/include/linux/qed/
Dqed_if.h479 static inline void __internal_ram_wr(void *p_hwfn, in __internal_ram_wr() argument