Lines Matching refs:p_rx

423 	struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue;  in qed_ll2_handle_slowpath()  local
440 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
447 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
458 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_handle_completion() local
462 if (!list_empty(&p_rx->active_descq)) in qed_ll2_rxq_handle_completion()
463 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_handle_completion()
478 if (qed_chain_consume(&p_rx->rxq_chain) != p_pkt->rxq_bd) in qed_ll2_rxq_handle_completion()
482 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_handle_completion()
489 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
492 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
500 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_completion() local
509 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_completion()
512 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
516 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_rxq_completion()
517 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
524 qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
525 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
548 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
556 struct qed_ll2_rx_queue *p_rx; in qed_ll2_rxq_flush() local
563 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_flush()
565 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
566 while (!list_empty(&p_rx->active_descq)) { in qed_ll2_rxq_flush()
567 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_flush()
571 list_move_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_flush()
572 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
585 b_last = list_empty(&p_rx->active_descq); in qed_ll2_rxq_flush()
591 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
593 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
620 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_lb_rxq_handler() local
631 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_lb_rxq_handler()
632 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
639 cqe = qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
640 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
675 if (list_empty(&p_rx->active_descq)) { in qed_ll2_lb_rxq_handler()
682 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_lb_rxq_handler()
701 qed_chain_consume(&p_rx->rxq_chain); in qed_ll2_lb_rxq_handler()
702 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_lb_rxq_handler()
937 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_sp_ll2_rx_queue_start() local
959 p_ramrod->sb_index = p_rx->rx_sb_index; in qed_sp_ll2_rx_queue_start()
963 DMA_REGPAIR_LE(p_ramrod->bd_base, p_rx->rxq_chain.p_phys_addr); in qed_sp_ll2_rx_queue_start()
964 cqe_pbl_size = (u16)qed_chain_get_page_cnt(&p_rx->rcq_chain); in qed_sp_ll2_rx_queue_start()
967 qed_chain_get_pbl_phys(&p_rx->rcq_chain)); in qed_sp_ll2_rx_queue_start()
1540 struct qed_ll2_rx_queue *p_rx; in qed_ll2_establish_connection() local
1559 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_establish_connection()
1562 qed_chain_reset(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1563 qed_chain_reset(&p_rx->rcq_chain); in qed_ll2_establish_connection()
1564 INIT_LIST_HEAD(&p_rx->active_descq); in qed_ll2_establish_connection()
1565 INIT_LIST_HEAD(&p_rx->free_descq); in qed_ll2_establish_connection()
1566 INIT_LIST_HEAD(&p_rx->posting_descq); in qed_ll2_establish_connection()
1567 spin_lock_init(&p_rx->lock); in qed_ll2_establish_connection()
1568 capacity = qed_chain_get_capacity(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1570 list_add_tail(&p_rx->descq_array[i].list_entry, in qed_ll2_establish_connection()
1571 &p_rx->free_descq); in qed_ll2_establish_connection()
1572 *p_rx->p_fw_cons = 0; in qed_ll2_establish_connection()
1621 p_rx->set_prod_addr = p_hwfn->regview + in qed_ll2_establish_connection()
1625 p_rx->ctx_based = 1; in qed_ll2_establish_connection()
1627 p_rx->set_prod_addr = p_hwfn->doorbells + in qed_ll2_establish_connection()
1632 p_rx->db_data.icid = cpu_to_le16((u16)p_ll2_conn->cid); in qed_ll2_establish_connection()
1633 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1635 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1679 struct qed_ll2_rx_queue *p_rx, in qed_ll2_post_rx_buffer_notify_fw() argument
1688 while (!list_empty(&p_rx->posting_descq)) { in qed_ll2_post_rx_buffer_notify_fw()
1689 p_posting_packet = list_first_entry(&p_rx->posting_descq, in qed_ll2_post_rx_buffer_notify_fw()
1693 &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1699 list_add_tail(&p_curp->list_entry, &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1706 bd_prod = qed_chain_get_prod_idx(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1707 cq_prod = qed_chain_get_prod_idx(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1708 if (p_rx->ctx_based) { in qed_ll2_post_rx_buffer_notify_fw()
1710 p_rx->db_data.prod.bd_prod = cpu_to_le16(bd_prod); in qed_ll2_post_rx_buffer_notify_fw()
1711 p_rx->db_data.prod.cqe_prod = cpu_to_le16(cq_prod); in qed_ll2_post_rx_buffer_notify_fw()
1716 DIRECT_REG_WR64(p_rx->set_prod_addr, in qed_ll2_post_rx_buffer_notify_fw()
1717 *((u64 *)&p_rx->db_data)); in qed_ll2_post_rx_buffer_notify_fw()
1727 DIRECT_REG_WR(p_rx->set_prod_addr, *((u32 *)&rx_prod)); in qed_ll2_post_rx_buffer_notify_fw()
1740 struct qed_ll2_rx_queue *p_rx; in qed_ll2_post_rx_buffer() local
1748 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_post_rx_buffer()
1749 if (!p_rx->set_prod_addr) in qed_ll2_post_rx_buffer()
1752 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()
1753 if (!list_empty(&p_rx->free_descq)) in qed_ll2_post_rx_buffer()
1754 p_curp = list_first_entry(&p_rx->free_descq, in qed_ll2_post_rx_buffer()
1757 if (qed_chain_get_elem_left(&p_rx->rxq_chain) && in qed_ll2_post_rx_buffer()
1758 qed_chain_get_elem_left(&p_rx->rcq_chain)) { in qed_ll2_post_rx_buffer()
1759 p_data = qed_chain_produce(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer()
1761 qed_chain_produce(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer()
1783 list_add_tail(&p_curp->list_entry, &p_rx->posting_descq); in qed_ll2_post_rx_buffer()
1788 qed_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp); in qed_ll2_post_rx_buffer()
1790 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()