Lines Matching refs:hw_cqe
300 static void create_read_req_cqe(struct t4_wq *wq, struct t4_cqe *hw_cqe, in create_read_req_cqe() argument
305 read_cqe->header = htonl(CQE_QPID_V(CQE_QPID(hw_cqe)) | in create_read_req_cqe()
306 CQE_SWCQE_V(SW_CQE(hw_cqe)) | in create_read_req_cqe()
309 read_cqe->bits_type_ts = hw_cqe->bits_type_ts; in create_read_req_cqe()
337 struct t4_cqe *hw_cqe, *swcqe, read_cqe; in c4iw_flush_hw_cq() local
343 ret = t4_next_hw_cqe(&chp->cq, &hw_cqe); in c4iw_flush_hw_cq()
351 qhp = get_qhp(chp->rhp, CQE_QPID(hw_cqe)); in c4iw_flush_hw_cq()
366 if (CQE_OPCODE(hw_cqe) == FW_RI_TERMINATE) in c4iw_flush_hw_cq()
369 if (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP) { in c4iw_flush_hw_cq()
375 if (CQE_TYPE(hw_cqe) == 1) in c4iw_flush_hw_cq()
380 if (CQE_WRID_STAG(hw_cqe) == 1) in c4iw_flush_hw_cq()
395 create_read_req_cqe(&qhp->wq, hw_cqe, &read_cqe); in c4iw_flush_hw_cq()
396 hw_cqe = &read_cqe; in c4iw_flush_hw_cq()
403 if (SQ_TYPE(hw_cqe)) { in c4iw_flush_hw_cq()
404 swsqe = &qhp->wq.sq.sw_sq[CQE_WRID_SQ_IDX(hw_cqe)]; in c4iw_flush_hw_cq()
405 swsqe->cqe = *hw_cqe; in c4iw_flush_hw_cq()
410 *swcqe = *hw_cqe; in c4iw_flush_hw_cq()
416 ret = t4_next_hw_cqe(&chp->cq, &hw_cqe); in c4iw_flush_hw_cq()
491 static u64 reap_srq_cqe(struct t4_cqe *hw_cqe, struct t4_srq *srq) in reap_srq_cqe() argument
493 int rel_idx = CQE_ABS_RQE_IDX(hw_cqe) - srq->rqt_abs_idx; in reap_srq_cqe()
549 struct t4_cqe *hw_cqe, read_cqe; in poll_cq() local
553 ret = t4_next_cqe(cq, &hw_cqe); in poll_cq()
558 CQE_OVFBIT(hw_cqe), CQE_QPID(hw_cqe), in poll_cq()
559 CQE_GENBIT(hw_cqe), CQE_TYPE(hw_cqe), CQE_STATUS(hw_cqe), in poll_cq()
560 CQE_OPCODE(hw_cqe), CQE_LEN(hw_cqe), CQE_WRID_HI(hw_cqe), in poll_cq()
561 CQE_WRID_LOW(hw_cqe)); in poll_cq()
574 if (wq->flushed && !SW_CQE(hw_cqe)) { in poll_cq()
582 if (CQE_OPCODE(hw_cqe) == FW_RI_TERMINATE) { in poll_cq()
590 if (DRAIN_CQE(hw_cqe)) { in poll_cq()
591 *cookie = CQE_DRAIN_COOKIE(hw_cqe); in poll_cq()
592 *cqe = *hw_cqe; in poll_cq()
603 if (RQ_TYPE(hw_cqe) && (CQE_OPCODE(hw_cqe) == FW_RI_READ_RESP)) { in poll_cq()
609 if (CQE_TYPE(hw_cqe) == 1) { in poll_cq()
610 if (CQE_STATUS(hw_cqe)) in poll_cq()
620 if (CQE_WRID_STAG(hw_cqe) == 1) { in poll_cq()
621 if (CQE_STATUS(hw_cqe)) in poll_cq()
640 create_read_req_cqe(wq, hw_cqe, &read_cqe); in poll_cq()
641 hw_cqe = &read_cqe; in poll_cq()
645 if (CQE_STATUS(hw_cqe) || t4_wq_in_error(wq)) { in poll_cq()
646 *cqe_flushed = (CQE_STATUS(hw_cqe) == T4_ERR_SWFLUSH); in poll_cq()
653 if (RQ_TYPE(hw_cqe)) { in poll_cq()
661 if (unlikely(!CQE_STATUS(hw_cqe) && in poll_cq()
662 CQE_WRID_MSN(hw_cqe) != wq->rq.msn)) { in poll_cq()
664 hw_cqe->header |= cpu_to_be32(CQE_STATUS_V(T4_ERR_MSN)); in poll_cq()
680 if (!SW_CQE(hw_cqe) && (CQE_WRID_SQ_IDX(hw_cqe) != wq->sq.cidx)) { in poll_cq()
684 CQE_WRID_SQ_IDX(hw_cqe)); in poll_cq()
685 swsqe = &wq->sq.sw_sq[CQE_WRID_SQ_IDX(hw_cqe)]; in poll_cq()
686 swsqe->cqe = *hw_cqe; in poll_cq()
693 *cqe = *hw_cqe; in poll_cq()
699 if (SQ_TYPE(hw_cqe)) { in poll_cq()
700 int idx = CQE_WRID_SQ_IDX(hw_cqe); in poll_cq()
719 c4iw_log_wr_stats(wq, hw_cqe); in poll_cq()
726 c4iw_log_wr_stats(wq, hw_cqe); in poll_cq()
729 *cookie = reap_srq_cqe(hw_cqe, srq); in poll_cq()
742 if (SW_CQE(hw_cqe)) { in poll_cq()