Lines Matching refs:p_rx

449 	struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue;  in qed_ll2_handle_slowpath()  local
466 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
473 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
484 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_handle_completion() local
488 if (!list_empty(&p_rx->active_descq)) in qed_ll2_rxq_handle_completion()
489 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_handle_completion()
504 if (unlikely(qed_chain_consume(&p_rx->rxq_chain) != p_pkt->rxq_bd)) in qed_ll2_rxq_handle_completion()
508 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_handle_completion()
515 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
518 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
526 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_completion() local
535 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_completion()
538 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
542 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_rxq_completion()
543 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
550 qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
551 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
574 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
582 struct qed_ll2_rx_queue *p_rx; in qed_ll2_rxq_flush() local
589 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_flush()
591 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
592 while (!list_empty(&p_rx->active_descq)) { in qed_ll2_rxq_flush()
593 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_flush()
597 list_move_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_flush()
598 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
611 b_last = list_empty(&p_rx->active_descq); in qed_ll2_rxq_flush()
617 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
619 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
646 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_lb_rxq_handler() local
657 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_lb_rxq_handler()
658 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
665 cqe = qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
666 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
700 if (unlikely(list_empty(&p_rx->active_descq))) { in qed_ll2_lb_rxq_handler()
707 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_lb_rxq_handler()
726 qed_chain_consume(&p_rx->rxq_chain); in qed_ll2_lb_rxq_handler()
727 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_lb_rxq_handler()
961 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_sp_ll2_rx_queue_start() local
983 p_ramrod->sb_index = p_rx->rx_sb_index; in qed_sp_ll2_rx_queue_start()
987 DMA_REGPAIR_LE(p_ramrod->bd_base, p_rx->rxq_chain.p_phys_addr); in qed_sp_ll2_rx_queue_start()
988 cqe_pbl_size = (u16)qed_chain_get_page_cnt(&p_rx->rcq_chain); in qed_sp_ll2_rx_queue_start()
991 qed_chain_get_pbl_phys(&p_rx->rcq_chain)); in qed_sp_ll2_rx_queue_start()
1565 struct qed_ll2_rx_queue *p_rx; in qed_ll2_establish_connection() local
1584 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_establish_connection()
1587 qed_chain_reset(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1588 qed_chain_reset(&p_rx->rcq_chain); in qed_ll2_establish_connection()
1589 INIT_LIST_HEAD(&p_rx->active_descq); in qed_ll2_establish_connection()
1590 INIT_LIST_HEAD(&p_rx->free_descq); in qed_ll2_establish_connection()
1591 INIT_LIST_HEAD(&p_rx->posting_descq); in qed_ll2_establish_connection()
1592 spin_lock_init(&p_rx->lock); in qed_ll2_establish_connection()
1593 capacity = qed_chain_get_capacity(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1595 list_add_tail(&p_rx->descq_array[i].list_entry, in qed_ll2_establish_connection()
1596 &p_rx->free_descq); in qed_ll2_establish_connection()
1597 *p_rx->p_fw_cons = 0; in qed_ll2_establish_connection()
1660 p_rx->set_prod_addr = in qed_ll2_establish_connection()
1666 p_rx->ctx_based = 1; in qed_ll2_establish_connection()
1668 p_rx->set_prod_addr = p_hwfn->doorbells + in qed_ll2_establish_connection()
1673 p_rx->db_data.icid = cpu_to_le16((u16)p_ll2_conn->cid); in qed_ll2_establish_connection()
1674 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1676 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1720 struct qed_ll2_rx_queue *p_rx, in qed_ll2_post_rx_buffer_notify_fw() argument
1729 while (!list_empty(&p_rx->posting_descq)) { in qed_ll2_post_rx_buffer_notify_fw()
1730 p_posting_packet = list_first_entry(&p_rx->posting_descq, in qed_ll2_post_rx_buffer_notify_fw()
1734 &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1740 list_add_tail(&p_curp->list_entry, &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1747 bd_prod = qed_chain_get_prod_idx(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1748 cq_prod = qed_chain_get_prod_idx(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1749 if (p_rx->ctx_based) { in qed_ll2_post_rx_buffer_notify_fw()
1751 p_rx->db_data.prod.bd_prod = cpu_to_le16(bd_prod); in qed_ll2_post_rx_buffer_notify_fw()
1752 p_rx->db_data.prod.cqe_prod = cpu_to_le16(cq_prod); in qed_ll2_post_rx_buffer_notify_fw()
1757 DIRECT_REG_WR64(p_rx->set_prod_addr, in qed_ll2_post_rx_buffer_notify_fw()
1758 *((u64 *)&p_rx->db_data)); in qed_ll2_post_rx_buffer_notify_fw()
1768 DIRECT_REG_WR(p_rx->set_prod_addr, *((u32 *)&rx_prod)); in qed_ll2_post_rx_buffer_notify_fw()
1781 struct qed_ll2_rx_queue *p_rx; in qed_ll2_post_rx_buffer() local
1789 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_post_rx_buffer()
1790 if (!p_rx->set_prod_addr) in qed_ll2_post_rx_buffer()
1793 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()
1794 if (!list_empty(&p_rx->free_descq)) in qed_ll2_post_rx_buffer()
1795 p_curp = list_first_entry(&p_rx->free_descq, in qed_ll2_post_rx_buffer()
1798 if (qed_chain_get_elem_left(&p_rx->rxq_chain) && in qed_ll2_post_rx_buffer()
1799 qed_chain_get_elem_left(&p_rx->rcq_chain)) { in qed_ll2_post_rx_buffer()
1800 p_data = qed_chain_produce(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer()
1802 qed_chain_produce(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer()
1824 list_add_tail(&p_curp->list_entry, &p_rx->posting_descq); in qed_ll2_post_rx_buffer()
1829 qed_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp); in qed_ll2_post_rx_buffer()
1831 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()