Lines Matching full:bat
110 dev_err(dpmaif_ctrl->dev, "RX BAT flow check fail\n"); in t7xx_dpmaif_update_bat_wr_idx()
151 * t7xx_dpmaif_rx_buf_alloc() - Allocate buffers for the BAT ring.
153 * @bat_req: Pointer to BAT request structure.
158 * Allocate skb and store the start address of the data buffer into the BAT ring.
176 /* Check BAT buffer space */ in t7xx_dpmaif_rx_buf_alloc()
305 * t7xx_dpmaif_rx_frag_alloc() - Allocates buffers for the Fragment BAT ring.
307 * @bat_req: Pointer to BAT request structure.
311 * Fragment BAT is used when the received packet does not fit in a normal BAT entry.
313 * into the Fragment BAT ring.
506 struct dpmaif_bat_request *bat; in t7xx_dpmaif_release_bat_entry() local
513 bat = rxq->bat_frag; in t7xx_dpmaif_release_bat_entry()
516 bat = rxq->bat_req; in t7xx_dpmaif_release_bat_entry()
520 if (rel_entry_num >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
523 old_rel_idx = bat->bat_release_rd_idx; in t7xx_dpmaif_release_bat_entry()
527 if (bat->bat_wr_idx == old_rel_idx) in t7xx_dpmaif_release_bat_entry()
535 if (new_rel_idx >= bat->bat_size_cnt) { in t7xx_dpmaif_release_bat_entry()
536 new_rel_idx -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
541 spin_lock_irqsave(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
543 unsigned int index = bat->bat_release_rd_idx + i; in t7xx_dpmaif_release_bat_entry()
545 if (index >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
546 index -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
548 clear_bit(index, bat->bat_bitmap); in t7xx_dpmaif_release_bat_entry()
550 spin_unlock_irqrestore(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
552 bat->bat_release_rd_idx = new_rel_idx; in t7xx_dpmaif_release_bat_entry()
582 dev_err(rxq->dpmaif_ctrl->dev, "Release PKT BAT failed: %d\n", ret); in t7xx_dpmaif_bat_release_and_add()
604 dev_err(rxq->dpmaif_ctrl->dev, "Release BAT entry failed: %d\n", ret); in t7xx_dpmaif_frag_bat_release_and_add()
928 * t7xx_dpmaif_bat_alloc() - Allocate the BAT ring buffer.
930 * @bat_req: Pointer to BAT request structure.
931 * @buf_type: BAT ring type.
933 * This function allocates the BAT ring buffer shared with the HW device, also allocates
934 * a buffer used to store information about the BAT skbs for further release.
1073 /* ALL RXQ use one BAT table, so choose DPF_RX_QNO_DFT */ in t7xx_dpmaif_bat_release_work()