Lines Matching refs:pg_chunk

120 		struct fl_pg_chunk pg_chunk;  member
352 if (q->use_pages && d->pg_chunk.page) { in clear_rx_desc()
353 (*d->pg_chunk.p_cnt)--; in clear_rx_desc()
354 if (!*d->pg_chunk.p_cnt) in clear_rx_desc()
355 dma_unmap_page(&pdev->dev, d->pg_chunk.mapping, in clear_rx_desc()
358 put_page(d->pg_chunk.page); in clear_rx_desc()
359 d->pg_chunk.page = NULL; in clear_rx_desc()
389 if (q->pg_chunk.page) { in free_rx_bufs()
390 __free_pages(q->pg_chunk.page, q->order); in free_rx_bufs()
391 q->pg_chunk.page = NULL; in free_rx_bufs()
442 if (!q->pg_chunk.page) { in alloc_pg_chunk()
445 q->pg_chunk.page = alloc_pages(gfp, order); in alloc_pg_chunk()
446 if (unlikely(!q->pg_chunk.page)) in alloc_pg_chunk()
448 q->pg_chunk.va = page_address(q->pg_chunk.page); in alloc_pg_chunk()
449 q->pg_chunk.p_cnt = q->pg_chunk.va + (PAGE_SIZE << order) - in alloc_pg_chunk()
451 q->pg_chunk.offset = 0; in alloc_pg_chunk()
452 mapping = dma_map_page(&adapter->pdev->dev, q->pg_chunk.page, in alloc_pg_chunk()
455 __free_pages(q->pg_chunk.page, order); in alloc_pg_chunk()
456 q->pg_chunk.page = NULL; in alloc_pg_chunk()
459 q->pg_chunk.mapping = mapping; in alloc_pg_chunk()
461 sd->pg_chunk = q->pg_chunk; in alloc_pg_chunk()
463 prefetch(sd->pg_chunk.p_cnt); in alloc_pg_chunk()
465 q->pg_chunk.offset += q->buf_size; in alloc_pg_chunk()
466 if (q->pg_chunk.offset == (PAGE_SIZE << order)) in alloc_pg_chunk()
467 q->pg_chunk.page = NULL; in alloc_pg_chunk()
469 q->pg_chunk.va += q->buf_size; in alloc_pg_chunk()
470 get_page(q->pg_chunk.page); in alloc_pg_chunk()
473 if (sd->pg_chunk.offset == 0) in alloc_pg_chunk()
474 *sd->pg_chunk.p_cnt = 1; in alloc_pg_chunk()
476 *sd->pg_chunk.p_cnt += 1; in alloc_pg_chunk()
517 mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset; in refill_fl()
855 memcpy(newskb->data, sd->pg_chunk.va, len); in get_packet_pg()
870 prefetch(sd->pg_chunk.p_cnt); in get_packet_pg()
883 (*sd->pg_chunk.p_cnt)--; in get_packet_pg()
884 if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page) in get_packet_pg()
885 dma_unmap_page(&adap->pdev->dev, sd->pg_chunk.mapping, in get_packet_pg()
889 memcpy(newskb->data, sd->pg_chunk.va, SGE_RX_PULL_LEN); in get_packet_pg()
890 skb_fill_page_desc(newskb, 0, sd->pg_chunk.page, in get_packet_pg()
891 sd->pg_chunk.offset + SGE_RX_PULL_LEN, in get_packet_pg()
898 sd->pg_chunk.page, in get_packet_pg()
899 sd->pg_chunk.offset, len); in get_packet_pg()
2156 (*sd->pg_chunk.p_cnt)--; in lro_add_page()
2157 if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page) in lro_add_page()
2158 dma_unmap_page(&adap->pdev->dev, sd->pg_chunk.mapping, in lro_add_page()
2162 put_page(sd->pg_chunk.page); in lro_add_page()
2173 cpl = qs->lro_va = sd->pg_chunk.va + 2; in lro_add_page()
2187 skb_frag_fill_page_desc(rx_frag, sd->pg_chunk.page, in lro_add_page()
2188 sd->pg_chunk.offset + offset, len); in lro_add_page()
2375 void *addr = fl->sdesc[fl->cidx].pg_chunk.va; in process_responses()