Lines Matching refs:wptr

171 	f->wptr = 0;  in bdx_fifo_init()
1101 rxfd = (struct rxf_desc *)(f->m.va + f->m.wptr); in bdx_rx_alloc_skbs()
1109 f->m.wptr += sizeof(struct rxf_desc); in bdx_rx_alloc_skbs()
1110 delta = f->m.wptr - f->m.memsz; in bdx_rx_alloc_skbs()
1112 f->m.wptr = delta; in bdx_rx_alloc_skbs()
1121 WRITE_REG(priv, f->m.reg_WPTR, f->m.wptr & TXF_WPTR_WR_PTR); in bdx_rx_alloc_skbs()
1156 rxfd = (struct rxf_desc *)(f->m.va + f->m.wptr); in bdx_recycle_skb()
1164 f->m.wptr += sizeof(struct rxf_desc); in bdx_recycle_skb()
1165 delta = f->m.wptr - f->m.memsz; in bdx_recycle_skb()
1167 f->m.wptr = delta; in bdx_recycle_skb()
1208 f->m.wptr = READ_REG(priv, f->m.reg_WPTR) & TXF_WPTR_WR_PTR; in bdx_rx_receive()
1210 size = f->m.wptr - f->m.rptr; in bdx_rx_receive()
1371 *pptr != db->wptr); /* or write pointer */ in __bdx_tx_db_ptr_next()
1387 BDX_ASSERT(db->rptr == db->wptr); /* can't read from empty db */ in bdx_tx_db_inc_rptr()
1397 __bdx_tx_db_ptr_next(db, &db->wptr); in bdx_tx_db_inc_wptr()
1398 BDX_ASSERT(db->rptr == db->wptr); /* we can not get empty db as in bdx_tx_db_inc_wptr()
1427 d->wptr = d->start; in bdx_tx_db_init()
1476 db->wptr->len = skb_headlen(skb); in bdx_tx_map_skb()
1477 db->wptr->addr.dma = dma_map_single(&priv->pdev->dev, skb->data, in bdx_tx_map_skb()
1478 db->wptr->len, DMA_TO_DEVICE); in bdx_tx_map_skb()
1479 pbl->len = CPU_CHIP_SWAP32(db->wptr->len); in bdx_tx_map_skb()
1480 pbl->pa_lo = CPU_CHIP_SWAP32(L32_64(db->wptr->addr.dma)); in bdx_tx_map_skb()
1481 pbl->pa_hi = CPU_CHIP_SWAP32(H32_64(db->wptr->addr.dma)); in bdx_tx_map_skb()
1491 db->wptr->len = skb_frag_size(frag); in bdx_tx_map_skb()
1492 db->wptr->addr.dma = skb_frag_dma_map(&priv->pdev->dev, frag, in bdx_tx_map_skb()
1497 pbl->len = CPU_CHIP_SWAP32(db->wptr->len); in bdx_tx_map_skb()
1498 pbl->pa_lo = CPU_CHIP_SWAP32(L32_64(db->wptr->addr.dma)); in bdx_tx_map_skb()
1499 pbl->pa_hi = CPU_CHIP_SWAP32(H32_64(db->wptr->addr.dma)); in bdx_tx_map_skb()
1504 db->wptr->len = -txd_sizes[nr_frags].bytes; in bdx_tx_map_skb()
1505 db->wptr->addr.skb = skb; in bdx_tx_map_skb()
1568 fsize = f->m.rptr - f->m.wptr; in bdx_tx_space()
1605 BDX_ASSERT(f->m.wptr >= f->m.memsz); /* started with valid wptr */ in bdx_tx_transmit()
1606 txdd = (struct txd_desc *)(f->m.va + f->m.wptr); in bdx_tx_transmit()
1638 f->m.wptr += txd_sizes[nr_frags].bytes; in bdx_tx_transmit()
1639 len = f->m.wptr - f->m.memsz; in bdx_tx_transmit()
1641 f->m.wptr = len; in bdx_tx_transmit()
1647 BDX_ASSERT(f->m.wptr >= f->m.memsz); /* finished with valid wptr */ in bdx_tx_transmit()
1657 WRITE_REG(priv, f->m.reg_WPTR, f->m.wptr & TXF_WPTR_WR_PTR); in bdx_tx_transmit()
1662 f->m.wptr & TXF_WPTR_WR_PTR); in bdx_tx_transmit()
1670 WRITE_REG(priv, f->m.reg_WPTR, f->m.wptr & TXF_WPTR_WR_PTR); in bdx_tx_transmit()
1703 f->m.wptr = READ_REG(priv, f->m.reg_WPTR) & TXF_WPTR_MASK; in bdx_tx_cleanup()
1706 while (f->m.wptr != f->m.rptr) { in bdx_tx_cleanup()
1727 BDX_ASSERT((f->m.wptr & TXF_WPTR_WR_PTR) >= f->m.memsz); in bdx_tx_cleanup()
1739 priv->txd_fifo0.m.wptr & TXF_WPTR_WR_PTR); in bdx_tx_cleanup()
1764 while (db->rptr != db->wptr) { in bdx_tx_free_skbs()
1799 int i = f->m.memsz - f->m.wptr; in bdx_tx_push_desc()
1805 memcpy(f->m.va + f->m.wptr, data, size); in bdx_tx_push_desc()
1806 f->m.wptr += size; in bdx_tx_push_desc()
1808 memcpy(f->m.va + f->m.wptr, data, i); in bdx_tx_push_desc()
1809 f->m.wptr = size - i; in bdx_tx_push_desc()
1810 memcpy(f->m.va, data + i, f->m.wptr); in bdx_tx_push_desc()
1812 WRITE_REG(priv, f->m.reg_WPTR, f->m.wptr & TXF_WPTR_WR_PTR); in bdx_tx_push_desc()