• Home
  • Raw
  • Download

Lines Matching refs:p_tx

304 	struct qed_ll2_tx_queue *p_tx;  in qed_ll2_txq_flush()  local
312 p_tx = &p_ll2_conn->tx_queue; in qed_ll2_txq_flush()
314 spin_lock_irqsave(&p_tx->lock, flags); in qed_ll2_txq_flush()
315 while (!list_empty(&p_tx->active_descq)) { in qed_ll2_txq_flush()
316 p_pkt = list_first_entry(&p_tx->active_descq, in qed_ll2_txq_flush()
322 b_last_packet = list_empty(&p_tx->active_descq); in qed_ll2_txq_flush()
323 list_add_tail(&p_pkt->list_entry, &p_tx->free_descq); in qed_ll2_txq_flush()
324 spin_unlock_irqrestore(&p_tx->lock, flags); in qed_ll2_txq_flush()
332 p_tx->cur_completing_packet = *p_pkt; in qed_ll2_txq_flush()
333 p_tx->cur_completing_bd_idx = 1; in qed_ll2_txq_flush()
335 p_tx->cur_completing_bd_idx == p_pkt->bd_used; in qed_ll2_txq_flush()
344 spin_lock_irqsave(&p_tx->lock, flags); in qed_ll2_txq_flush()
346 spin_unlock_irqrestore(&p_tx->lock, flags); in qed_ll2_txq_flush()
352 struct qed_ll2_tx_queue *p_tx = &p_ll2_conn->tx_queue; in qed_ll2_txq_completion() local
362 spin_lock_irqsave(&p_tx->lock, flags); in qed_ll2_txq_completion()
363 if (p_tx->b_completing_packet) { in qed_ll2_txq_completion()
368 new_idx = le16_to_cpu(*p_tx->p_fw_cons); in qed_ll2_txq_completion()
369 num_bds = ((s16)new_idx - (s16)p_tx->bds_idx); in qed_ll2_txq_completion()
371 if (list_empty(&p_tx->active_descq)) in qed_ll2_txq_completion()
374 p_pkt = list_first_entry(&p_tx->active_descq, in qed_ll2_txq_completion()
379 p_tx->b_completing_packet = true; in qed_ll2_txq_completion()
380 p_tx->cur_completing_packet = *p_pkt; in qed_ll2_txq_completion()
391 p_tx->bds_idx += num_bds_in_packet; in qed_ll2_txq_completion()
393 qed_chain_consume(&p_tx->txq_chain); in qed_ll2_txq_completion()
395 p_tx->cur_completing_bd_idx = 1; in qed_ll2_txq_completion()
396 b_last_frag = p_tx->cur_completing_bd_idx == p_pkt->bd_used; in qed_ll2_txq_completion()
397 list_add_tail(&p_pkt->list_entry, &p_tx->free_descq); in qed_ll2_txq_completion()
399 spin_unlock_irqrestore(&p_tx->lock, flags); in qed_ll2_txq_completion()
407 spin_lock_irqsave(&p_tx->lock, flags); in qed_ll2_txq_completion()
410 p_tx->b_completing_packet = false; in qed_ll2_txq_completion()
413 spin_unlock_irqrestore(&p_tx->lock, flags); in qed_ll2_txq_completion()
882 struct qed_ll2_tx_queue *p_tx = &p_ll2_conn->tx_queue; in qed_ll2_lb_txq_completion() local
895 new_idx = le16_to_cpu(*p_tx->p_fw_cons); in qed_ll2_lb_txq_completion()
896 num_bds = ((s16)new_idx - (s16)p_tx->bds_idx); in qed_ll2_lb_txq_completion()
902 if (list_empty(&p_tx->active_descq)) in qed_ll2_lb_txq_completion()
905 p_pkt = list_first_entry(&p_tx->active_descq, in qed_ll2_lb_txq_completion()
920 p_tx->bds_idx++; in qed_ll2_lb_txq_completion()
921 qed_chain_consume(&p_tx->txq_chain); in qed_ll2_lb_txq_completion()
924 list_add_tail(&p_pkt->list_entry, &p_tx->free_descq); in qed_ll2_lb_txq_completion()
1028 struct qed_ll2_tx_queue *p_tx = &p_ll2_conn->tx_queue; in qed_sp_ll2_tx_queue_start() local
1058 p_ramrod->sb_index = p_tx->tx_sb_index; in qed_sp_ll2_tx_queue_start()
1064 qed_chain_get_pbl_phys(&p_tx->txq_chain)); in qed_sp_ll2_tx_queue_start()
1065 pbl_size = qed_chain_get_page_cnt(&p_tx->txq_chain); in qed_sp_ll2_tx_queue_start()
1113 rc = qed_db_recovery_add(p_hwfn->cdev, p_tx->doorbell_addr, in qed_sp_ll2_tx_queue_start()
1114 &p_tx->db_msg, DB_REC_WIDTH_32B, in qed_sp_ll2_tx_queue_start()
1150 struct qed_ll2_tx_queue *p_tx = &p_ll2_conn->tx_queue; in qed_sp_ll2_tx_queue_stop() local
1155 qed_db_recovery_del(p_hwfn->cdev, p_tx->doorbell_addr, &p_tx->db_msg); in qed_sp_ll2_tx_queue_stop()
1569 struct qed_ll2_tx_queue *p_tx; in qed_ll2_establish_connection() local
1588 p_tx = &p_ll2_conn->tx_queue; in qed_ll2_establish_connection()
1602 qed_chain_reset(&p_tx->txq_chain); in qed_ll2_establish_connection()
1603 INIT_LIST_HEAD(&p_tx->active_descq); in qed_ll2_establish_connection()
1604 INIT_LIST_HEAD(&p_tx->free_descq); in qed_ll2_establish_connection()
1605 INIT_LIST_HEAD(&p_tx->sending_descq); in qed_ll2_establish_connection()
1606 spin_lock_init(&p_tx->lock); in qed_ll2_establish_connection()
1607 capacity = qed_chain_get_capacity(&p_tx->txq_chain); in qed_ll2_establish_connection()
1613 p_pkt = p_tx->descq_mem + desc_size * i; in qed_ll2_establish_connection()
1614 list_add_tail(&p_pkt->list_entry, &p_tx->free_descq); in qed_ll2_establish_connection()
1616 p_tx->cur_completing_bd_idx = 0; in qed_ll2_establish_connection()
1617 p_tx->bds_idx = 0; in qed_ll2_establish_connection()
1618 p_tx->b_completing_packet = false; in qed_ll2_establish_connection()
1619 p_tx->cur_send_packet = NULL; in qed_ll2_establish_connection()
1620 p_tx->cur_send_frag_num = 0; in qed_ll2_establish_connection()
1621 p_tx->cur_completing_frag_num = 0; in qed_ll2_establish_connection()
1622 *p_tx->p_fw_cons = 0; in qed_ll2_establish_connection()
1683 p_tx->doorbell_addr = (u8 __iomem *)p_hwfn->doorbells + in qed_ll2_establish_connection()
1687 SET_FIELD(p_tx->db_msg.params, CORE_DB_DATA_DEST, DB_DEST_XCM); in qed_ll2_establish_connection()
1688 SET_FIELD(p_tx->db_msg.params, CORE_DB_DATA_AGG_CMD, DB_AGG_CMD_SET); in qed_ll2_establish_connection()
1689 SET_FIELD(p_tx->db_msg.params, CORE_DB_DATA_AGG_VAL_SEL, in qed_ll2_establish_connection()
1691 p_tx->db_msg.agg_flags = DQ_XCM_CORE_DQ_CF_CMD; in qed_ll2_establish_connection()
1839 struct qed_ll2_tx_queue *p_tx, in qed_ll2_prepare_tx_packet_set() argument
1848 p_tx->cur_send_packet = p_curp; in qed_ll2_prepare_tx_packet_set()
1849 p_tx->cur_send_frag_num = 0; in qed_ll2_prepare_tx_packet_set()
1851 p_curp->bds_set[p_tx->cur_send_frag_num].tx_frag = pkt->first_frag; in qed_ll2_prepare_tx_packet_set()
1852 p_curp->bds_set[p_tx->cur_send_frag_num].frag_len = pkt->first_frag_len; in qed_ll2_prepare_tx_packet_set()
1853 p_tx->cur_send_frag_num++; in qed_ll2_prepare_tx_packet_set()
1952 struct qed_ll2_tx_queue *p_tx = &p_ll2_conn->tx_queue; in qed_ll2_tx_packet_notify() local
1973 while (!list_empty(&p_tx->sending_descq)) { in qed_ll2_tx_packet_notify()
1974 p_pkt = list_first_entry(&p_tx->sending_descq, in qed_ll2_tx_packet_notify()
1979 list_move_tail(&p_pkt->list_entry, &p_tx->active_descq); in qed_ll2_tx_packet_notify()
1982 p_tx->db_msg.spq_prod = cpu_to_le16(bd_prod); in qed_ll2_tx_packet_notify()
1987 DIRECT_REG_WR(p_tx->doorbell_addr, *((u32 *)&p_tx->db_msg)); in qed_ll2_tx_packet_notify()
1994 p_ll2_conn->input.conn_type, p_tx->db_msg.spq_prod); in qed_ll2_tx_packet_notify()
2005 struct qed_ll2_tx_queue *p_tx; in qed_ll2_prepare_tx_packet() local
2013 p_tx = &p_ll2_conn->tx_queue; in qed_ll2_prepare_tx_packet()
2014 p_tx_chain = &p_tx->txq_chain; in qed_ll2_prepare_tx_packet()
2019 spin_lock_irqsave(&p_tx->lock, flags); in qed_ll2_prepare_tx_packet()
2020 if (unlikely(p_tx->cur_send_packet)) { in qed_ll2_prepare_tx_packet()
2026 if (unlikely(!list_empty(&p_tx->free_descq))) in qed_ll2_prepare_tx_packet()
2027 p_curp = list_first_entry(&p_tx->free_descq, in qed_ll2_prepare_tx_packet()
2039 qed_ll2_prepare_tx_packet_set(p_hwfn, p_tx, p_curp, pkt, notify_fw); in qed_ll2_prepare_tx_packet()
2046 spin_unlock_irqrestore(&p_tx->lock, flags); in qed_ll2_prepare_tx_packet()