Lines Matching refs:sdesc

195 static inline dma_addr_t get_buf_addr(const struct rx_sw_desc *sdesc)  in get_buf_addr()  argument
197 return sdesc->dma_addr & ~(dma_addr_t)(RX_LARGE_BUF | RX_UNMAPPED_BUF); in get_buf_addr()
207 static inline bool is_buf_mapped(const struct rx_sw_desc *sdesc) in is_buf_mapped() argument
209 return !(sdesc->dma_addr & RX_UNMAPPED_BUF); in is_buf_mapped()
380 struct tx_sw_desc *sdesc; in free_tx_desc() local
386 sdesc = &tq->sdesc[cidx]; in free_tx_desc()
392 if (sdesc->skb) { in free_tx_desc()
394 unmap_sgl(dev, sdesc->skb, sdesc->sgl, tq); in free_tx_desc()
395 dev_consume_skb_any(sdesc->skb); in free_tx_desc()
396 sdesc->skb = NULL; in free_tx_desc()
399 sdesc++; in free_tx_desc()
402 sdesc = tq->sdesc; in free_tx_desc()
455 const struct rx_sw_desc *sdesc) in get_buf_size() argument
459 return (s->fl_pg_order > 0 && (sdesc->dma_addr & RX_LARGE_BUF) in get_buf_size()
476 struct rx_sw_desc *sdesc = &fl->sdesc[fl->cidx]; in free_rx_bufs() local
478 if (is_buf_mapped(sdesc)) in free_rx_bufs()
479 dma_unmap_page(adapter->pdev_dev, get_buf_addr(sdesc), in free_rx_bufs()
480 get_buf_size(adapter, sdesc), in free_rx_bufs()
482 put_page(sdesc->page); in free_rx_bufs()
483 sdesc->page = NULL; in free_rx_bufs()
505 struct rx_sw_desc *sdesc = &fl->sdesc[fl->cidx]; in unmap_rx_buf() local
507 if (is_buf_mapped(sdesc)) in unmap_rx_buf()
508 dma_unmap_page(adapter->pdev_dev, get_buf_addr(sdesc), in unmap_rx_buf()
509 get_buf_size(adapter, sdesc), in unmap_rx_buf()
511 sdesc->page = NULL; in unmap_rx_buf()
571 static inline void set_rx_sw_desc(struct rx_sw_desc *sdesc, struct page *page, in set_rx_sw_desc() argument
574 sdesc->page = page; in set_rx_sw_desc()
575 sdesc->dma_addr = dma_addr; in set_rx_sw_desc()
612 struct rx_sw_desc *sdesc = &fl->sdesc[fl->pidx]; in refill_fl() local
663 set_rx_sw_desc(sdesc, page, dma_addr); in refill_fl()
664 sdesc++; in refill_fl()
669 sdesc = fl->sdesc; in refill_fl()
692 set_rx_sw_desc(sdesc, page, dma_addr); in refill_fl()
693 sdesc++; in refill_fl()
698 sdesc = fl->sdesc; in refill_fl()
1441 tq->sdesc[last_desc].skb = skb; in t4vf_eth_xmit()
1442 tq->sdesc[last_desc].sgl = sgl; in t4vf_eth_xmit()
1714 struct rx_sw_desc *sdesc; in restore_rx_bufs() local
1721 sdesc = &fl->sdesc[fl->cidx]; in restore_rx_bufs()
1722 sdesc->page = gl->frags[frags].page; in restore_rx_bufs()
1723 sdesc->dma_addr |= RX_UNMAPPED_BUF; in restore_rx_bufs()
1781 const struct rx_sw_desc *sdesc; in process_responses() local
1810 sdesc = &rxq->fl.sdesc[rxq->fl.cidx]; in process_responses()
1811 bufsz = get_buf_size(adapter, sdesc); in process_responses()
1812 fp->page = sdesc->page; in process_responses()
1828 get_buf_addr(sdesc), in process_responses()
2288 &fl->addr, &fl->sdesc, s->stat_len); in t4vf_sge_alloc_rxq()
2395 kfree(fl->sdesc); in t4vf_sge_alloc_rxq()
2396 fl->sdesc = NULL; in t4vf_sge_alloc_rxq()
2436 &txq->q.phys_addr, &txq->q.sdesc, s->stat_len); in t4vf_sge_alloc_eth_txq()
2481 kfree(txq->q.sdesc); in t4vf_sge_alloc_eth_txq()
2482 txq->q.sdesc = NULL; in t4vf_sge_alloc_eth_txq()
2522 tq->sdesc = NULL; in free_txq()
2551 kfree(fl->sdesc); in free_rspq_fl()
2552 fl->sdesc = NULL; in free_rspq_fl()
2579 kfree(txq->q.sdesc); in t4vf_free_sge_resources()