Lines Matching full:bat

109 	dev_err(dpmaif_ctrl->dev, "RX BAT flow check fail\n");  in t7xx_dpmaif_update_bat_wr_idx()
150 * t7xx_dpmaif_rx_buf_alloc() - Allocate buffers for the BAT ring.
152 * @bat_req: Pointer to BAT request structure.
157 * Allocate skb and store the start address of the data buffer into the BAT ring.
175 /* Check BAT buffer space */ in t7xx_dpmaif_rx_buf_alloc()
304 * t7xx_dpmaif_rx_frag_alloc() - Allocates buffers for the Fragment BAT ring.
306 * @bat_req: Pointer to BAT request structure.
310 * Fragment BAT is used when the received packet does not fit in a normal BAT entry.
312 * into the Fragment BAT ring.
505 struct dpmaif_bat_request *bat; in t7xx_dpmaif_release_bat_entry() local
512 bat = rxq->bat_frag; in t7xx_dpmaif_release_bat_entry()
515 bat = rxq->bat_req; in t7xx_dpmaif_release_bat_entry()
519 if (rel_entry_num >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
522 old_rel_idx = bat->bat_release_rd_idx; in t7xx_dpmaif_release_bat_entry()
526 if (bat->bat_wr_idx == old_rel_idx) in t7xx_dpmaif_release_bat_entry()
534 if (new_rel_idx >= bat->bat_size_cnt) { in t7xx_dpmaif_release_bat_entry()
535 new_rel_idx -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
540 spin_lock_irqsave(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
542 unsigned int index = bat->bat_release_rd_idx + i; in t7xx_dpmaif_release_bat_entry()
544 if (index >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
545 index -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
547 clear_bit(index, bat->bat_bitmap); in t7xx_dpmaif_release_bat_entry()
549 spin_unlock_irqrestore(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
551 bat->bat_release_rd_idx = new_rel_idx; in t7xx_dpmaif_release_bat_entry()
581 dev_err(rxq->dpmaif_ctrl->dev, "Release PKT BAT failed: %d\n", ret); in t7xx_dpmaif_bat_release_and_add()
603 dev_err(rxq->dpmaif_ctrl->dev, "Release BAT entry failed: %d\n", ret); in t7xx_dpmaif_frag_bat_release_and_add()
927 * t7xx_dpmaif_bat_alloc() - Allocate the BAT ring buffer.
929 * @bat_req: Pointer to BAT request structure.
930 * @buf_type: BAT ring type.
932 * This function allocates the BAT ring buffer shared with the HW device, also allocates
933 * a buffer used to store information about the BAT skbs for further release.
1072 /* ALL RXQ use one BAT table, so choose DPF_RX_QNO_DFT */ in t7xx_dpmaif_bat_release_work()