Lines Matching refs:p_ptt

71 	struct qed_ptt *p_ptt;  in qed_ptt_invalidate()  local
75 p_ptt = &p_hwfn->p_ptt_pool->ptts[i]; in qed_ptt_invalidate()
76 p_ptt->pxp.offset = QED_BAR_INVALID_OFFSET; in qed_ptt_invalidate()
88 struct qed_ptt *p_ptt; in qed_ptt_acquire() local
96 p_ptt = list_first_entry(&p_hwfn->p_ptt_pool->free_list, in qed_ptt_acquire()
98 list_del(&p_ptt->list_entry); in qed_ptt_acquire()
103 "allocated ptt %d\n", p_ptt->idx); in qed_ptt_acquire()
104 return p_ptt; in qed_ptt_acquire()
115 void qed_ptt_release(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) in qed_ptt_release() argument
118 list_add(&p_ptt->list_entry, &p_hwfn->p_ptt_pool->free_list); in qed_ptt_release()
122 u32 qed_ptt_get_hw_addr(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) in qed_ptt_get_hw_addr() argument
125 return le32_to_cpu(p_ptt->pxp.offset) << 2; in qed_ptt_get_hw_addr()
128 static u32 qed_ptt_config_addr(struct qed_ptt *p_ptt) in qed_ptt_config_addr() argument
131 p_ptt->idx * sizeof(struct pxp_ptt_entry); in qed_ptt_config_addr()
134 u32 qed_ptt_get_bar_addr(struct qed_ptt *p_ptt) in qed_ptt_get_bar_addr() argument
137 p_ptt->idx * PXP_EXTERNAL_BAR_PF_WINDOW_SINGLE_SIZE; in qed_ptt_get_bar_addr()
141 struct qed_ptt *p_ptt, u32 new_hw_addr) in qed_ptt_set_win() argument
145 prev_hw_addr = qed_ptt_get_hw_addr(p_hwfn, p_ptt); in qed_ptt_set_win()
153 p_ptt->idx, new_hw_addr); in qed_ptt_set_win()
156 p_ptt->pxp.offset = cpu_to_le32(new_hw_addr >> 2); in qed_ptt_set_win()
159 qed_ptt_config_addr(p_ptt) + in qed_ptt_set_win()
161 le32_to_cpu(p_ptt->pxp.offset)); in qed_ptt_set_win()
165 struct qed_ptt *p_ptt, u32 hw_addr) in qed_set_ptt() argument
167 u32 win_hw_addr = qed_ptt_get_hw_addr(p_hwfn, p_ptt); in qed_set_ptt()
172 if (p_ptt->hwfn_id != p_hwfn->my_id) in qed_set_ptt()
175 p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id); in qed_set_ptt()
180 qed_ptt_set_win(p_hwfn, p_ptt, hw_addr); in qed_set_ptt()
184 return qed_ptt_get_bar_addr(p_ptt) + offset; in qed_set_ptt()
200 struct qed_ptt *p_ptt, in qed_wr() argument
203 u32 bar_addr = qed_set_ptt(p_hwfn, p_ptt, hw_addr); in qed_wr()
212 struct qed_ptt *p_ptt, in qed_rd() argument
215 u32 bar_addr = qed_set_ptt(p_hwfn, p_ptt, hw_addr); in qed_rd()
226 struct qed_ptt *p_ptt, in qed_memcpy_hw() argument
238 qed_ptt_set_win(p_hwfn, p_ptt, hw_addr + done); in qed_memcpy_hw()
239 hw_offset = qed_ptt_get_bar_addr(p_ptt); in qed_memcpy_hw()
259 struct qed_ptt *p_ptt, void *dest, u32 hw_addr, size_t n) in qed_memcpy_from() argument
265 qed_memcpy_hw(p_hwfn, p_ptt, dest, hw_addr, n, false); in qed_memcpy_from()
269 struct qed_ptt *p_ptt, u32 hw_addr, void *src, size_t n) in qed_memcpy_to() argument
275 qed_memcpy_hw(p_hwfn, p_ptt, src, hw_addr, n, true); in qed_memcpy_to()
278 void qed_fid_pretend(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u16 fid) in qed_fid_pretend() argument
295 p_ptt->pxp.pretend.control = cpu_to_le16(control); in qed_fid_pretend()
296 p_ptt->pxp.pretend.fid.concrete_fid.fid = cpu_to_le16(fid); in qed_fid_pretend()
299 qed_ptt_config_addr(p_ptt) + in qed_fid_pretend()
301 *(u32 *)&p_ptt->pxp.pretend); in qed_fid_pretend()
305 struct qed_ptt *p_ptt, u8 port_id) in qed_port_pretend() argument
313 p_ptt->pxp.pretend.control = cpu_to_le16(control); in qed_port_pretend()
316 qed_ptt_config_addr(p_ptt) + in qed_port_pretend()
318 *(u32 *)&p_ptt->pxp.pretend); in qed_port_pretend()
321 void qed_port_unpretend(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) in qed_port_unpretend() argument
329 p_ptt->pxp.pretend.control = cpu_to_le16(control); in qed_port_unpretend()
332 qed_ptt_config_addr(p_ptt) + in qed_port_unpretend()
334 *(u32 *)&p_ptt->pxp.pretend); in qed_port_unpretend()
338 struct qed_ptt *p_ptt, u8 port_id, u16 fid) in qed_port_fid_pretend() argument
349 p_ptt->pxp.pretend.control = cpu_to_le16(control); in qed_port_fid_pretend()
350 p_ptt->pxp.pretend.fid.concrete_fid.fid = cpu_to_le16(fid); in qed_port_fid_pretend()
352 qed_ptt_config_addr(p_ptt) + in qed_port_fid_pretend()
354 *(u32 *)&p_ptt->pxp.pretend); in qed_port_fid_pretend()
447 struct qed_ptt *p_ptt) in qed_dmae_post_command() argument
493 qed_wr(p_hwfn, p_ptt, in qed_dmae_post_command()
499 qed_wr(p_hwfn, p_ptt, qed_dmae_idx_to_go_cmd(idx_cmd), DMAE_GO_VALUE); in qed_dmae_post_command()
603 struct qed_ptt *p_ptt, in qed_dmae_execute_sub_operation() argument
649 qed_dmae_post_command(p_hwfn, p_ptt); in qed_dmae_execute_sub_operation()
669 struct qed_ptt *p_ptt, in qed_dmae_execute_command() argument
732 p_ptt, in qed_dmae_execute_command()
739 qed_hw_err_notify(p_hwfn, p_ptt, QED_HW_ERR_DMAE_FAIL, in qed_dmae_execute_command()
751 struct qed_ptt *p_ptt, in qed_dmae_host2grc() argument
761 rc = qed_dmae_execute_command(p_hwfn, p_ptt, source_addr, in qed_dmae_host2grc()
773 struct qed_ptt *p_ptt, in qed_dmae_grc2host() argument
784 rc = qed_dmae_execute_command(p_hwfn, p_ptt, grc_addr_in_dw, in qed_dmae_grc2host()
795 struct qed_ptt *p_ptt, in qed_dmae_host2host() argument
804 rc = qed_dmae_execute_command(p_hwfn, p_ptt, source_addr, in qed_dmae_host2host()
815 void qed_hw_err_notify(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in qed_hw_err_notify() argument
846 qed_mcp_send_raw_debug_data(p_hwfn, p_ptt, buf, len); in qed_hw_err_notify()
850 struct qed_ptt *p_ptt, const char *phase) in qed_dmae_sanity() argument
885 rc = qed_dmae_host2host(p_hwfn, p_ptt, p_phys, p_phys + size, in qed_dmae_sanity()