Lines Matching full:bat
145 dev_err(dpmaif_ctrl->dev, "RX BAT flow check fail\n"); in t7xx_dpmaif_update_bat_wr_idx()
186 * t7xx_dpmaif_rx_buf_alloc() - Allocate buffers for the BAT ring.
188 * @bat_req: Pointer to BAT request structure.
193 * Allocate skb and store the start address of the data buffer into the BAT ring.
211 /* Check BAT buffer space */ in t7xx_dpmaif_rx_buf_alloc()
340 * t7xx_dpmaif_rx_frag_alloc() - Allocates buffers for the Fragment BAT ring.
342 * @bat_req: Pointer to BAT request structure.
346 * Fragment BAT is used when the received packet does not fit in a normal BAT entry.
348 * into the Fragment BAT ring.
541 struct dpmaif_bat_request *bat; in t7xx_dpmaif_release_bat_entry() local
548 bat = rxq->bat_frag; in t7xx_dpmaif_release_bat_entry()
551 bat = rxq->bat_req; in t7xx_dpmaif_release_bat_entry()
555 if (rel_entry_num >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
558 old_rel_idx = bat->bat_release_rd_idx; in t7xx_dpmaif_release_bat_entry()
562 if (bat->bat_wr_idx == old_rel_idx) in t7xx_dpmaif_release_bat_entry()
570 if (new_rel_idx >= bat->bat_size_cnt) { in t7xx_dpmaif_release_bat_entry()
571 new_rel_idx -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
576 spin_lock_irqsave(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
578 unsigned int index = bat->bat_release_rd_idx + i; in t7xx_dpmaif_release_bat_entry()
580 if (index >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry()
581 index -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry()
583 clear_bit(index, bat->bat_bitmap); in t7xx_dpmaif_release_bat_entry()
585 spin_unlock_irqrestore(&bat->mask_lock, flags); in t7xx_dpmaif_release_bat_entry()
587 bat->bat_release_rd_idx = new_rel_idx; in t7xx_dpmaif_release_bat_entry()
617 dev_err(rxq->dpmaif_ctrl->dev, "Release PKT BAT failed: %d\n", ret); in t7xx_dpmaif_bat_release_and_add()
639 dev_err(rxq->dpmaif_ctrl->dev, "Release BAT entry failed: %d\n", ret); in t7xx_dpmaif_frag_bat_release_and_add()
963 * t7xx_dpmaif_bat_alloc() - Allocate the BAT ring buffer.
965 * @bat_req: Pointer to BAT request structure.
966 * @buf_type: BAT ring type.
968 * This function allocates the BAT ring buffer shared with the HW device, also allocates
969 * a buffer used to store information about the BAT skbs for further release.
1144 /* ALL RXQ use one BAT table, so choose DPF_RX_QNO_DFT */ in t7xx_dpmaif_bat_release_work()