Lines Matching refs:p_rx
447 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_handle_slowpath() local
464 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
471 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_handle_slowpath()
482 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_handle_completion() local
486 if (!list_empty(&p_rx->active_descq)) in qed_ll2_rxq_handle_completion()
487 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_handle_completion()
502 if (qed_chain_consume(&p_rx->rxq_chain) != p_pkt->rxq_bd) in qed_ll2_rxq_handle_completion()
506 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_handle_completion()
513 spin_unlock_irqrestore(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
516 spin_lock_irqsave(&p_rx->lock, *p_lock_flags); in qed_ll2_rxq_handle_completion()
524 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_completion() local
530 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_completion()
531 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_rxq_completion()
532 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
539 qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
540 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_rxq_completion()
563 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_completion()
571 struct qed_ll2_rx_queue *p_rx; in qed_ll2_rxq_flush() local
578 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_rxq_flush()
580 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
581 while (!list_empty(&p_rx->active_descq)) { in qed_ll2_rxq_flush()
582 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_rxq_flush()
586 list_move_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_rxq_flush()
587 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
600 b_last = list_empty(&p_rx->active_descq); in qed_ll2_rxq_flush()
606 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_rxq_flush()
608 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_rxq_flush()
635 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_ll2_lb_rxq_handler() local
646 cq_new_idx = le16_to_cpu(*p_rx->p_fw_cons); in qed_ll2_lb_rxq_handler()
647 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
654 cqe = qed_chain_consume(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
655 cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); in qed_ll2_lb_rxq_handler()
690 if (list_empty(&p_rx->active_descq)) { in qed_ll2_lb_rxq_handler()
697 p_pkt = list_first_entry(&p_rx->active_descq, in qed_ll2_lb_rxq_handler()
716 qed_chain_consume(&p_rx->rxq_chain); in qed_ll2_lb_rxq_handler()
717 list_add_tail(&p_pkt->list_entry, &p_rx->free_descq); in qed_ll2_lb_rxq_handler()
936 struct qed_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; in qed_sp_ll2_rx_queue_start() local
958 p_ramrod->sb_index = p_rx->rx_sb_index; in qed_sp_ll2_rx_queue_start()
962 DMA_REGPAIR_LE(p_ramrod->bd_base, p_rx->rxq_chain.p_phys_addr); in qed_sp_ll2_rx_queue_start()
963 cqe_pbl_size = (u16)qed_chain_get_page_cnt(&p_rx->rcq_chain); in qed_sp_ll2_rx_queue_start()
966 qed_chain_get_pbl_phys(&p_rx->rcq_chain)); in qed_sp_ll2_rx_queue_start()
1465 struct qed_ll2_rx_queue *p_rx; in qed_ll2_establish_connection() local
1483 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_establish_connection()
1486 qed_chain_reset(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1487 qed_chain_reset(&p_rx->rcq_chain); in qed_ll2_establish_connection()
1488 INIT_LIST_HEAD(&p_rx->active_descq); in qed_ll2_establish_connection()
1489 INIT_LIST_HEAD(&p_rx->free_descq); in qed_ll2_establish_connection()
1490 INIT_LIST_HEAD(&p_rx->posting_descq); in qed_ll2_establish_connection()
1491 spin_lock_init(&p_rx->lock); in qed_ll2_establish_connection()
1492 capacity = qed_chain_get_capacity(&p_rx->rxq_chain); in qed_ll2_establish_connection()
1494 list_add_tail(&p_rx->descq_array[i].list_entry, in qed_ll2_establish_connection()
1495 &p_rx->free_descq); in qed_ll2_establish_connection()
1496 *p_rx->p_fw_cons = 0; in qed_ll2_establish_connection()
1528 p_rx->set_prod_addr = (u8 __iomem *)p_hwfn->regview + in qed_ll2_establish_connection()
1564 struct qed_ll2_rx_queue *p_rx, in qed_ll2_post_rx_buffer_notify_fw() argument
1573 while (!list_empty(&p_rx->posting_descq)) { in qed_ll2_post_rx_buffer_notify_fw()
1574 p_posting_packet = list_first_entry(&p_rx->posting_descq, in qed_ll2_post_rx_buffer_notify_fw()
1578 &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1584 list_add_tail(&p_curp->list_entry, &p_rx->active_descq); in qed_ll2_post_rx_buffer_notify_fw()
1591 bd_prod = qed_chain_get_prod_idx(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1592 cq_prod = qed_chain_get_prod_idx(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer_notify_fw()
1595 DIRECT_REG_WR(p_rx->set_prod_addr, *((u32 *)&rx_prod)); in qed_ll2_post_rx_buffer_notify_fw()
1607 struct qed_ll2_rx_queue *p_rx; in qed_ll2_post_rx_buffer() local
1615 p_rx = &p_ll2_conn->rx_queue; in qed_ll2_post_rx_buffer()
1617 spin_lock_irqsave(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()
1618 if (!list_empty(&p_rx->free_descq)) in qed_ll2_post_rx_buffer()
1619 p_curp = list_first_entry(&p_rx->free_descq, in qed_ll2_post_rx_buffer()
1622 if (qed_chain_get_elem_left(&p_rx->rxq_chain) && in qed_ll2_post_rx_buffer()
1623 qed_chain_get_elem_left(&p_rx->rcq_chain)) { in qed_ll2_post_rx_buffer()
1624 p_data = qed_chain_produce(&p_rx->rxq_chain); in qed_ll2_post_rx_buffer()
1626 qed_chain_produce(&p_rx->rcq_chain); in qed_ll2_post_rx_buffer()
1648 list_add_tail(&p_curp->list_entry, &p_rx->posting_descq); in qed_ll2_post_rx_buffer()
1653 qed_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp); in qed_ll2_post_rx_buffer()
1655 spin_unlock_irqrestore(&p_rx->lock, flags); in qed_ll2_post_rx_buffer()