Lines Matching refs:p_ent
63 struct qed_spq_entry *p_ent, in __qed_spq_block() argument
69 comp_done = (struct qed_spq_comp_done *)p_ent->comp_cb.cookie; in __qed_spq_block()
91 struct qed_spq_entry *p_ent, in qed_spq_block() argument
102 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, false); in qed_spq_block()
108 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true); in qed_spq_block()
127 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true); in qed_spq_block()
131 comp_done = (struct qed_spq_comp_done *)p_ent->comp_cb.cookie; in qed_spq_block()
143 le32_to_cpu(p_ent->elem.hdr.cid), in qed_spq_block()
144 qed_get_ramrod_cmd_id_str(p_ent->elem.hdr.protocol_id, in qed_spq_block()
145 p_ent->elem.hdr.cmd_id), in qed_spq_block()
146 p_ent->elem.hdr.cmd_id, in qed_spq_block()
147 qed_get_protocol_type_str(p_ent->elem.hdr.protocol_id), in qed_spq_block()
148 p_ent->elem.hdr.protocol_id, in qed_spq_block()
149 le16_to_cpu(p_ent->elem.hdr.echo)); in qed_spq_block()
159 struct qed_spq_entry *p_ent) in qed_spq_fill_entry() argument
161 p_ent->flags = 0; in qed_spq_fill_entry()
163 switch (p_ent->comp_mode) { in qed_spq_fill_entry()
166 p_ent->comp_cb.function = qed_spq_blocking_cb; in qed_spq_fill_entry()
172 p_ent->comp_mode); in qed_spq_fill_entry()
179 p_ent->elem.hdr.cid, in qed_spq_fill_entry()
180 qed_get_ramrod_cmd_id_str(p_ent->elem.hdr.protocol_id, in qed_spq_fill_entry()
181 p_ent->elem.hdr.cmd_id), in qed_spq_fill_entry()
182 p_ent->elem.hdr.cmd_id, in qed_spq_fill_entry()
183 qed_get_protocol_type_str(p_ent->elem.hdr.protocol_id), in qed_spq_fill_entry()
184 p_ent->elem.hdr.protocol_id, in qed_spq_fill_entry()
185 p_ent->elem.data_ptr.hi, p_ent->elem.data_ptr.lo, in qed_spq_fill_entry()
186 D_TRINE(p_ent->comp_mode, QED_SPQ_MODE_EBLOCK, in qed_spq_fill_entry()
234 struct qed_spq *p_spq, struct qed_spq_entry *p_ent) in qed_spq_hw_post() argument
241 p_ent->elem.hdr.echo = cpu_to_le16(echo); in qed_spq_hw_post()
248 *elem = p_ent->elem; /* struct assignment */ in qed_spq_hw_post()
630 struct qed_spq_entry *p_ent = NULL; in qed_spq_get_entry() local
636 p_ent = kzalloc(sizeof(*p_ent), GFP_ATOMIC); in qed_spq_get_entry()
637 if (!p_ent) { in qed_spq_get_entry()
643 p_ent->queue = &p_spq->unlimited_pending; in qed_spq_get_entry()
645 p_ent = list_first_entry(&p_spq->free_pool, in qed_spq_get_entry()
647 list_del(&p_ent->list); in qed_spq_get_entry()
648 p_ent->queue = &p_spq->pending; in qed_spq_get_entry()
651 *pp_ent = p_ent; in qed_spq_get_entry()
660 struct qed_spq_entry *p_ent) in __qed_spq_return_entry() argument
662 list_add_tail(&p_ent->list, &p_hwfn->p_spq->free_pool); in __qed_spq_return_entry()
665 void qed_spq_return_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry *p_ent) in qed_spq_return_entry() argument
668 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_return_entry()
687 struct qed_spq_entry *p_ent, in qed_spq_add_entry() argument
692 if (p_ent->queue == &p_spq->unlimited_pending) { in qed_spq_add_entry()
694 list_add_tail(&p_ent->list, &p_spq->unlimited_pending); in qed_spq_add_entry()
709 p_ent->elem.data_ptr = p_en2->elem.data_ptr; in qed_spq_add_entry()
711 *p_en2 = *p_ent; in qed_spq_add_entry()
714 if (p_ent->comp_mode != QED_SPQ_MODE_EBLOCK) in qed_spq_add_entry()
715 kfree(p_ent); in qed_spq_add_entry()
717 p_ent->post_ent = p_en2; in qed_spq_add_entry()
719 p_ent = p_en2; in qed_spq_add_entry()
726 list_add_tail(&p_ent->list, &p_spq->pending); in qed_spq_add_entry()
730 list_add(&p_ent->list, &p_spq->pending); in qed_spq_add_entry()
761 struct qed_spq_entry *p_ent = in qed_spq_post_list() local
763 list_move_tail(&p_ent->list, &p_spq->completion_pending); in qed_spq_post_list()
766 rc = qed_spq_hw_post(p_hwfn, p_spq, p_ent); in qed_spq_post_list()
768 list_del(&p_ent->list); in qed_spq_post_list()
769 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post_list()
780 struct qed_spq_entry *p_ent = NULL; in qed_spq_pend_post() local
786 p_ent = list_first_entry(&p_spq->unlimited_pending, in qed_spq_pend_post()
788 if (!p_ent) in qed_spq_pend_post()
791 list_del(&p_ent->list); in qed_spq_pend_post()
793 qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority); in qed_spq_pend_post()
800 static void qed_spq_recov_set_ret_code(struct qed_spq_entry *p_ent, in qed_spq_recov_set_ret_code() argument
806 if (p_ent->elem.hdr.protocol_id == PROTOCOLID_ROCE || in qed_spq_recov_set_ret_code()
807 p_ent->elem.hdr.protocol_id == PROTOCOLID_IWARP) in qed_spq_recov_set_ret_code()
831 struct qed_spq_entry *p_ent, u8 *fw_return_code) in qed_spq_post() argument
841 if (!p_ent) { in qed_spq_post()
850 qed_get_ramrod_cmd_id_str(p_ent->elem.hdr.protocol_id, in qed_spq_post()
851 p_ent->elem.hdr.cmd_id), in qed_spq_post()
852 p_ent->elem.hdr.cmd_id, in qed_spq_post()
853 qed_get_protocol_type_str(p_ent->elem.hdr.protocol_id), in qed_spq_post()
854 p_ent->elem.hdr.protocol_id); in qed_spq_post()
857 qed_spq_recov_set_ret_code(p_ent, fw_return_code); in qed_spq_post()
862 rc = qed_spq_fill_entry(p_hwfn, p_ent); in qed_spq_post()
873 eblock = (p_ent->comp_mode == QED_SPQ_MODE_EBLOCK); in qed_spq_post()
876 rc = qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority); in qed_spq_post()
898 rc = qed_spq_block(p_hwfn, p_ent, fw_return_code, in qed_spq_post()
899 p_ent->queue == &p_spq->unlimited_pending); in qed_spq_post()
901 if (p_ent->queue == &p_spq->unlimited_pending) { in qed_spq_post()
902 struct qed_spq_entry *p_post_ent = p_ent->post_ent; in qed_spq_post()
904 kfree(p_ent); in qed_spq_post()
907 p_ent = p_post_ent; in qed_spq_post()
914 qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post()
920 list_del(&p_ent->list); in qed_spq_post()
921 qed_spq_comp_bmap_update(p_hwfn, p_ent->elem.hdr.echo); in qed_spq_post()
926 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post()
938 struct qed_spq_entry *p_ent = NULL; in qed_spq_completion() local
950 list_for_each_entry_safe(p_ent, tmp, &p_spq->completion_pending, list) { in qed_spq_completion()
951 if (p_ent->elem.hdr.echo == echo) { in qed_spq_completion()
952 list_del(&p_ent->list); in qed_spq_completion()
955 found = p_ent; in qed_spq_completion()
965 le16_to_cpu(p_ent->elem.hdr.echo)); in qed_spq_completion()
983 p_ent->comp_cb.function, p_ent->comp_cb.cookie); in qed_spq_completion()