Lines Matching refs:unmap

93 	struct bnad_tx_unmap *unmap;  in bnad_tx_buff_unmap()  local
97 unmap = &unmap_q[index]; in bnad_tx_buff_unmap()
98 nvecs = unmap->nvecs; in bnad_tx_buff_unmap()
100 skb = unmap->skb; in bnad_tx_buff_unmap()
101 unmap->skb = NULL; in bnad_tx_buff_unmap()
102 unmap->nvecs = 0; in bnad_tx_buff_unmap()
104 dma_unmap_addr(&unmap->vectors[0], dma_addr), in bnad_tx_buff_unmap()
106 dma_unmap_addr_set(&unmap->vectors[0], dma_addr, 0); in bnad_tx_buff_unmap()
115 unmap = &unmap_q[index]; in bnad_tx_buff_unmap()
119 dma_unmap_addr(&unmap->vectors[vector], dma_addr), in bnad_tx_buff_unmap()
120 dma_unmap_len(&unmap->vectors[vector], dma_len), in bnad_tx_buff_unmap()
122 dma_unmap_addr_set(&unmap->vectors[vector], dma_addr, 0); in bnad_tx_buff_unmap()
164 struct bnad_tx_unmap *unmap; in bnad_txcmpl_process() local
180 unmap = &unmap_q[cons]; in bnad_txcmpl_process()
182 skb = unmap->skb; in bnad_txcmpl_process()
187 unmap_wis = BNA_TXQ_WI_NEEDED(unmap->nvecs); in bnad_txcmpl_process()
292 bnad_rxq_cleanup_page(struct bnad *bnad, struct bnad_rx_unmap *unmap) in bnad_rxq_cleanup_page() argument
294 if (!unmap->page) in bnad_rxq_cleanup_page()
298 dma_unmap_addr(&unmap->vector, dma_addr), in bnad_rxq_cleanup_page()
299 unmap->vector.len, DMA_FROM_DEVICE); in bnad_rxq_cleanup_page()
300 put_page(unmap->page); in bnad_rxq_cleanup_page()
301 unmap->page = NULL; in bnad_rxq_cleanup_page()
302 dma_unmap_addr_set(&unmap->vector, dma_addr, 0); in bnad_rxq_cleanup_page()
303 unmap->vector.len = 0; in bnad_rxq_cleanup_page()
307 bnad_rxq_cleanup_skb(struct bnad *bnad, struct bnad_rx_unmap *unmap) in bnad_rxq_cleanup_skb() argument
309 if (!unmap->skb) in bnad_rxq_cleanup_skb()
313 dma_unmap_addr(&unmap->vector, dma_addr), in bnad_rxq_cleanup_skb()
314 unmap->vector.len, DMA_FROM_DEVICE); in bnad_rxq_cleanup_skb()
315 dev_kfree_skb_any(unmap->skb); in bnad_rxq_cleanup_skb()
316 unmap->skb = NULL; in bnad_rxq_cleanup_skb()
317 dma_unmap_addr_set(&unmap->vector, dma_addr, 0); in bnad_rxq_cleanup_skb()
318 unmap->vector.len = 0; in bnad_rxq_cleanup_skb()
328 struct bnad_rx_unmap *unmap = &unmap_q->unmap[i]; in bnad_rxq_cleanup() local
331 bnad_rxq_cleanup_skb(bnad, unmap); in bnad_rxq_cleanup()
333 bnad_rxq_cleanup_page(bnad, unmap); in bnad_rxq_cleanup()
343 struct bnad_rx_unmap *unmap, *prev; in bnad_rxq_refill_page() local
356 unmap = &unmap_q->unmap[prod]; in bnad_rxq_refill_page()
363 prev = &unmap_q->unmap[unmap_q->reuse_pi]; in bnad_rxq_refill_page()
384 unmap->page = page; in bnad_rxq_refill_page()
385 unmap->page_offset = page_offset; in bnad_rxq_refill_page()
386 dma_unmap_addr_set(&unmap->vector, dma_addr, dma_addr); in bnad_rxq_refill_page()
387 unmap->vector.len = unmap_q->map_size; in bnad_rxq_refill_page()
417 struct bnad_rx_unmap *unmap; in bnad_rxq_refill_skb() local
428 unmap = &unmap_q->unmap[prod]; in bnad_rxq_refill_skb()
447 unmap->skb = skb; in bnad_rxq_refill_skb()
448 dma_unmap_addr_set(&unmap->vector, dma_addr, dma_addr); in bnad_rxq_refill_skb()
449 unmap->vector.len = buff_sz; in bnad_rxq_refill_skb()
503 struct bnad_rx_unmap *unmap; in bnad_cq_drop_packet() local
508 unmap = &unmap_q->unmap[ci]; in bnad_cq_drop_packet()
512 bnad_rxq_cleanup_skb(bnad, unmap); in bnad_cq_drop_packet()
514 bnad_rxq_cleanup_page(bnad, unmap); in bnad_cq_drop_packet()
537 prefetch(page_address(unmap_q->unmap[ci].page) + in bnad_cq_setup_skb_frags()
538 unmap_q->unmap[ci].page_offset); in bnad_cq_setup_skb_frags()
541 struct bnad_rx_unmap *unmap; in bnad_cq_setup_skb_frags() local
544 unmap = &unmap_q->unmap[ci]; in bnad_cq_setup_skb_frags()
548 dma_unmap_addr(&unmap->vector, dma_addr), in bnad_cq_setup_skb_frags()
549 unmap->vector.len, DMA_FROM_DEVICE); in bnad_cq_setup_skb_frags()
552 skb->truesize += unmap->vector.len; in bnad_cq_setup_skb_frags()
556 unmap->page, unmap->page_offset, len); in bnad_cq_setup_skb_frags()
558 unmap->page = NULL; in bnad_cq_setup_skb_frags()
559 unmap->vector.len = 0; in bnad_cq_setup_skb_frags()
571 struct bnad_rx_unmap *unmap, u32 len) in bnad_cq_setup_skb() argument
576 dma_unmap_addr(&unmap->vector, dma_addr), in bnad_cq_setup_skb()
577 unmap->vector.len, DMA_FROM_DEVICE); in bnad_cq_setup_skb()
582 unmap->skb = NULL; in bnad_cq_setup_skb()
583 unmap->vector.len = 0; in bnad_cq_setup_skb()
592 struct bnad_rx_unmap *unmap = NULL; in bnad_cq_process() local
630 unmap = &unmap_q->unmap[sop_ci]; in bnad_cq_process()
631 skb = unmap->skb; in bnad_cq_process()
690 bnad_cq_setup_skb(bnad, skb, unmap, len); in bnad_cq_process()
2914 struct bnad_tx_unmap *unmap_q, *unmap, *head_unmap; in bnad_start_xmit() local
3011 unmap = head_unmap; in bnad_start_xmit()
3021 dma_unmap_addr_set(&unmap->vectors[0], dma_addr, dma_addr); in bnad_start_xmit()
3045 unmap = &unmap_q[prod]; in bnad_start_xmit()
3059 dma_unmap_len_set(&unmap->vectors[vect_id], dma_len, size); in bnad_start_xmit()
3062 dma_unmap_addr_set(&unmap->vectors[vect_id], dma_addr, in bnad_start_xmit()