Lines Matching refs:p_ent

88 			   struct qed_spq_entry *p_ent,  in __qed_spq_block()  argument
94 comp_done = (struct qed_spq_comp_done *)p_ent->comp_cb.cookie; in __qed_spq_block()
116 struct qed_spq_entry *p_ent, in qed_spq_block() argument
127 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, false); in qed_spq_block()
133 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true); in qed_spq_block()
152 rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true); in qed_spq_block()
156 comp_done = (struct qed_spq_comp_done *)p_ent->comp_cb.cookie; in qed_spq_block()
165 le32_to_cpu(p_ent->elem.hdr.cid), in qed_spq_block()
166 p_ent->elem.hdr.cmd_id, in qed_spq_block()
167 p_ent->elem.hdr.protocol_id, in qed_spq_block()
168 le16_to_cpu(p_ent->elem.hdr.echo)); in qed_spq_block()
177 struct qed_spq_entry *p_ent) in qed_spq_fill_entry() argument
179 p_ent->flags = 0; in qed_spq_fill_entry()
181 switch (p_ent->comp_mode) { in qed_spq_fill_entry()
184 p_ent->comp_cb.function = qed_spq_blocking_cb; in qed_spq_fill_entry()
190 p_ent->comp_mode); in qed_spq_fill_entry()
196 p_ent->elem.hdr.cid, in qed_spq_fill_entry()
197 p_ent->elem.hdr.cmd_id, in qed_spq_fill_entry()
198 p_ent->elem.hdr.protocol_id, in qed_spq_fill_entry()
199 p_ent->elem.data_ptr.hi, in qed_spq_fill_entry()
200 p_ent->elem.data_ptr.lo, in qed_spq_fill_entry()
201 D_TRINE(p_ent->comp_mode, QED_SPQ_MODE_EBLOCK, in qed_spq_fill_entry()
252 struct qed_spq *p_spq, struct qed_spq_entry *p_ent) in qed_spq_hw_post() argument
259 p_ent->elem.hdr.echo = cpu_to_le16(echo); in qed_spq_hw_post()
266 *elem = p_ent->elem; /* struct assignment */ in qed_spq_hw_post()
624 struct qed_spq_entry *p_ent = NULL; in qed_spq_get_entry() local
630 p_ent = kzalloc(sizeof(*p_ent), GFP_ATOMIC); in qed_spq_get_entry()
631 if (!p_ent) { in qed_spq_get_entry()
637 p_ent->queue = &p_spq->unlimited_pending; in qed_spq_get_entry()
639 p_ent = list_first_entry(&p_spq->free_pool, in qed_spq_get_entry()
641 list_del(&p_ent->list); in qed_spq_get_entry()
642 p_ent->queue = &p_spq->pending; in qed_spq_get_entry()
645 *pp_ent = p_ent; in qed_spq_get_entry()
654 struct qed_spq_entry *p_ent) in __qed_spq_return_entry() argument
656 list_add_tail(&p_ent->list, &p_hwfn->p_spq->free_pool); in __qed_spq_return_entry()
659 void qed_spq_return_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry *p_ent) in qed_spq_return_entry() argument
662 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_return_entry()
681 struct qed_spq_entry *p_ent, in qed_spq_add_entry() argument
686 if (p_ent->queue == &p_spq->unlimited_pending) { in qed_spq_add_entry()
689 list_add_tail(&p_ent->list, &p_spq->unlimited_pending); in qed_spq_add_entry()
704 p_ent->elem.data_ptr = p_en2->elem.data_ptr; in qed_spq_add_entry()
706 *p_en2 = *p_ent; in qed_spq_add_entry()
709 if (p_ent->comp_mode != QED_SPQ_MODE_EBLOCK) in qed_spq_add_entry()
710 kfree(p_ent); in qed_spq_add_entry()
712 p_ent->post_ent = p_en2; in qed_spq_add_entry()
714 p_ent = p_en2; in qed_spq_add_entry()
721 list_add_tail(&p_ent->list, &p_spq->pending); in qed_spq_add_entry()
725 list_add(&p_ent->list, &p_spq->pending); in qed_spq_add_entry()
756 struct qed_spq_entry *p_ent = in qed_spq_post_list() local
758 list_move_tail(&p_ent->list, &p_spq->completion_pending); in qed_spq_post_list()
761 rc = qed_spq_hw_post(p_hwfn, p_spq, p_ent); in qed_spq_post_list()
763 list_del(&p_ent->list); in qed_spq_post_list()
764 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post_list()
775 struct qed_spq_entry *p_ent = NULL; in qed_spq_pend_post() local
781 p_ent = list_first_entry(&p_spq->unlimited_pending, in qed_spq_pend_post()
783 if (!p_ent) in qed_spq_pend_post()
786 list_del(&p_ent->list); in qed_spq_pend_post()
788 qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority); in qed_spq_pend_post()
795 static void qed_spq_recov_set_ret_code(struct qed_spq_entry *p_ent, in qed_spq_recov_set_ret_code() argument
801 if (p_ent->elem.hdr.protocol_id == PROTOCOLID_ROCE || in qed_spq_recov_set_ret_code()
802 p_ent->elem.hdr.protocol_id == PROTOCOLID_IWARP) in qed_spq_recov_set_ret_code()
826 struct qed_spq_entry *p_ent, u8 *fw_return_code) in qed_spq_post() argument
836 if (!p_ent) { in qed_spq_post()
845 p_ent->elem.hdr.cmd_id, p_ent->elem.hdr.protocol_id); in qed_spq_post()
848 qed_spq_recov_set_ret_code(p_ent, fw_return_code); in qed_spq_post()
853 rc = qed_spq_fill_entry(p_hwfn, p_ent); in qed_spq_post()
864 eblock = (p_ent->comp_mode == QED_SPQ_MODE_EBLOCK); in qed_spq_post()
867 rc = qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority); in qed_spq_post()
889 rc = qed_spq_block(p_hwfn, p_ent, fw_return_code, in qed_spq_post()
890 p_ent->queue == &p_spq->unlimited_pending); in qed_spq_post()
892 if (p_ent->queue == &p_spq->unlimited_pending) { in qed_spq_post()
893 struct qed_spq_entry *p_post_ent = p_ent->post_ent; in qed_spq_post()
895 kfree(p_ent); in qed_spq_post()
898 p_ent = p_post_ent; in qed_spq_post()
905 qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post()
911 list_del(&p_ent->list); in qed_spq_post()
912 qed_spq_comp_bmap_update(p_hwfn, p_ent->elem.hdr.echo); in qed_spq_post()
917 __qed_spq_return_entry(p_hwfn, p_ent); in qed_spq_post()
929 struct qed_spq_entry *p_ent = NULL; in qed_spq_completion() local
941 list_for_each_entry_safe(p_ent, tmp, &p_spq->completion_pending, list) { in qed_spq_completion()
942 if (p_ent->elem.hdr.echo == echo) { in qed_spq_completion()
943 list_del(&p_ent->list); in qed_spq_completion()
946 found = p_ent; in qed_spq_completion()
956 le16_to_cpu(p_ent->elem.hdr.echo)); in qed_spq_completion()
974 p_ent->comp_cb.function, p_ent->comp_cb.cookie); in qed_spq_completion()