Lines Matching refs:p_rx

420 	struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue;  in qed_ll2_handle_slowpath()  local
437 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
444 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
455 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_handle_completion() local
459 if (!list_empty(&p_rx->active_descq)) in qed_ll2_rxq_handle_completion()
460 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_handle_completion()
475 if (qed_chain_consume(&p_rx->rxq_chain) != p_pkt->rxq_bd) in qed_ll2_rxq_handle_completion()
479 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_handle_completion()
486 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
489 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
497 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_completion() local
503 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_completion()
504 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_rxq_completion()
505 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
512 qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
513 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
536 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
544 struct qed_ll2_rx_queue *p_rx; in qed_ll2_rxq_flush() local
551 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_flush()
553 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
554 while (!list_empty(&p_rx->active_descq)) { in qed_ll2_rxq_flush()
555 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_flush()
559 list_move_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_flush()
560 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
573 b_last = list_empty(&p_rx->active_descq); in qed_ll2_rxq_flush()
579 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
581 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
608 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_lb_rxq_handler() local
619 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_lb_rxq_handler()
620 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
627 cqe = qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
628 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
663 if (list_empty(&p_rx->active_descq)) { in qed_ll2_lb_rxq_handler()
670 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_lb_rxq_handler()
689 qed_chain_consume(&p_rx->rxq_chain); in qed_ll2_lb_rxq_handler()
690 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_lb_rxq_handler()
919 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_sp_ll2_rx_queue_start() local
941 p_ramrod->sb_index = p_rx->rx_sb_index; in qed_sp_ll2_rx_queue_start()
945 DMA_REGPAIR_LE(p_ramrod->bd_base, p_rx->rxq_chain.p_phys_addr); in qed_sp_ll2_rx_queue_start()
946 cqe_pbl_size = (u16)qed_chain_get_page_cnt(&p_rx->rcq_chain); in qed_sp_ll2_rx_queue_start()
949 qed_chain_get_pbl_phys(&p_rx->rcq_chain)); in qed_sp_ll2_rx_queue_start()
1520 struct qed_ll2_rx_queue *p_rx; in qed_ll2_establish_connection() local
1539 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_establish_connection()
1542 qed_chain_reset(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1543 qed_chain_reset(&p_rx->rcq_chain); in qed_ll2_establish_connection()
1544 INIT_LIST_HEAD(&p_rx->active_descq); in qed_ll2_establish_connection()
1545 INIT_LIST_HEAD(&p_rx->free_descq); in qed_ll2_establish_connection()
1546 INIT_LIST_HEAD(&p_rx->posting_descq); in qed_ll2_establish_connection()
1547 spin_lock_init(&p_rx->lock); in qed_ll2_establish_connection()
1548 capacity = qed_chain_get_capacity(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1550 list_add_tail(&p_rx->descq_array[i].list_entry, in qed_ll2_establish_connection()
1551 &p_rx->free_descq); in qed_ll2_establish_connection()
1552 *p_rx->p_fw_cons = 0; in qed_ll2_establish_connection()
1601 p_rx->set_prod_addr = p_hwfn->regview + in qed_ll2_establish_connection()
1605 p_rx->ctx_based = 1; in qed_ll2_establish_connection()
1607 p_rx->set_prod_addr = p_hwfn->doorbells + in qed_ll2_establish_connection()
1612 p_rx->db_data.icid = cpu_to_le16((u16)p_ll2_conn->cid); in qed_ll2_establish_connection()
1613 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1615 SET_FIELD(p_rx->db_data.params, in qed_ll2_establish_connection()
1658 struct qed_ll2_rx_queue *p_rx, in qed_ll2_post_rx_buffer_notify_fw() argument
1667 while (!list_empty(&p_rx->posting_descq)) { in qed_ll2_post_rx_buffer_notify_fw()
1668 p_posting_packet = list_first_entry(&p_rx->posting_descq, in qed_ll2_post_rx_buffer_notify_fw()
1672 &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1678 list_add_tail(&p_curp->list_entry, &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1685 bd_prod = qed_chain_get_prod_idx(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1686 cq_prod = qed_chain_get_prod_idx(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1687 if (p_rx->ctx_based) { in qed_ll2_post_rx_buffer_notify_fw()
1689 p_rx->db_data.prod.bd_prod = cpu_to_le16(bd_prod); in qed_ll2_post_rx_buffer_notify_fw()
1690 p_rx->db_data.prod.cqe_prod = cpu_to_le16(cq_prod); in qed_ll2_post_rx_buffer_notify_fw()
1695 DIRECT_REG_WR64(p_rx->set_prod_addr, in qed_ll2_post_rx_buffer_notify_fw()
1696 *((u64 *)&p_rx->db_data)); in qed_ll2_post_rx_buffer_notify_fw()
1706 DIRECT_REG_WR(p_rx->set_prod_addr, *((u32 *)&rx_prod)); in qed_ll2_post_rx_buffer_notify_fw()
1719 struct qed_ll2_rx_queue *p_rx; in qed_ll2_post_rx_buffer() local
1727 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_post_rx_buffer()
1729 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()
1730 if (!list_empty(&p_rx->free_descq)) in qed_ll2_post_rx_buffer()
1731 p_curp = list_first_entry(&p_rx->free_descq, in qed_ll2_post_rx_buffer()
1734 if (qed_chain_get_elem_left(&p_rx->rxq_chain) && in qed_ll2_post_rx_buffer()
1735 qed_chain_get_elem_left(&p_rx->rcq_chain)) { in qed_ll2_post_rx_buffer()
1736 p_data = qed_chain_produce(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer()
1738 qed_chain_produce(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer()
1760 list_add_tail(&p_curp->list_entry, &p_rx->posting_descq); in qed_ll2_post_rx_buffer()
1765 qed_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp); in qed_ll2_post_rx_buffer()
1767 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()