Lines Matching refs:bdp
109 static void gfar_init_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp, in gfar_init_rxbdp() argument
114 bdp->bufPtr = cpu_to_be32(buf); in gfar_init_rxbdp()
117 if (bdp == rx_queue->rx_bd_base + rx_queue->rx_ring_size - 1) in gfar_init_rxbdp()
122 bdp->lstatus = cpu_to_be32(lstatus); in gfar_init_rxbdp()
1246 struct rxbd8 *bdp; in gfar_alloc_rx_buffs() local
1251 bdp = &rx_queue->rx_bd_base[i]; in gfar_alloc_rx_buffs()
1264 gfar_init_rxbdp(rx_queue, bdp, in gfar_alloc_rx_buffs()
1268 bdp++; in gfar_alloc_rx_buffs()
1273 bdp = rx_queue->rx_bd_base; in gfar_alloc_rx_buffs()
1734 static inline struct txbd8 *skip_txbd(struct txbd8 *bdp, int stride, in skip_txbd() argument
1737 struct txbd8 *new_bd = bdp + stride; in skip_txbd()
1742 static inline struct txbd8 *next_txbd(struct txbd8 *bdp, struct txbd8 *base, in next_txbd() argument
1745 return skip_txbd(bdp, 1, base, ring_size); in next_txbd()
2156 struct txbd8 *bdp, *next = NULL; in gfar_clean_tx_ring() local
2171 bdp = tx_queue->dirty_tx; in gfar_clean_tx_ring()
2190 lbdp = skip_txbd(bdp, nr_txbds - 1, base, tx_ring_size); in gfar_clean_tx_ring()
2200 next = next_txbd(bdp, base, tx_ring_size); in gfar_clean_tx_ring()
2204 buflen = be16_to_cpu(bdp->length); in gfar_clean_tx_ring()
2206 dma_unmap_single(priv->dev, be32_to_cpu(bdp->bufPtr), in gfar_clean_tx_ring()
2218 gfar_clear_txbd_status(bdp); in gfar_clean_tx_ring()
2219 bdp = next; in gfar_clean_tx_ring()
2222 gfar_clear_txbd_status(bdp); in gfar_clean_tx_ring()
2223 bdp = next_txbd(bdp, base, tx_ring_size); in gfar_clean_tx_ring()
2226 dma_unmap_page(priv->dev, be32_to_cpu(bdp->bufPtr), in gfar_clean_tx_ring()
2227 be16_to_cpu(bdp->length), in gfar_clean_tx_ring()
2229 gfar_clear_txbd_status(bdp); in gfar_clean_tx_ring()
2230 bdp = next_txbd(bdp, base, tx_ring_size); in gfar_clean_tx_ring()
2256 tx_queue->dirty_tx = bdp; in gfar_clean_tx_ring()
2509 struct rxbd8 *bdp; in gfar_clean_rx_ring() local
2526 bdp = &rx_queue->rx_bd_base[i]; in gfar_clean_rx_ring()
2527 lstatus = be32_to_cpu(bdp->lstatus); in gfar_clean_rx_ring()