Lines Matching refs:buffer_info

1505 	txdr->buffer_info = vzalloc(size);  in e1000_setup_tx_resources()
1506 if (!txdr->buffer_info) in e1000_setup_tx_resources()
1518 vfree(txdr->buffer_info); in e1000_setup_tx_resources()
1546 vfree(txdr->buffer_info); in e1000_setup_tx_resources()
1695 rxdr->buffer_info = vzalloc(size); in e1000_setup_rx_resources()
1696 if (!rxdr->buffer_info) in e1000_setup_rx_resources()
1710 vfree(rxdr->buffer_info); in e1000_setup_rx_resources()
1931 vfree(tx_ring->buffer_info); in e1000_free_tx_resources()
1932 tx_ring->buffer_info = NULL; in e1000_free_tx_resources()
1956 struct e1000_tx_buffer *buffer_info, in e1000_unmap_and_free_tx_resource() argument
1959 if (buffer_info->dma) { in e1000_unmap_and_free_tx_resource()
1960 if (buffer_info->mapped_as_page) in e1000_unmap_and_free_tx_resource()
1961 dma_unmap_page(&adapter->pdev->dev, buffer_info->dma, in e1000_unmap_and_free_tx_resource()
1962 buffer_info->length, DMA_TO_DEVICE); in e1000_unmap_and_free_tx_resource()
1964 dma_unmap_single(&adapter->pdev->dev, buffer_info->dma, in e1000_unmap_and_free_tx_resource()
1965 buffer_info->length, in e1000_unmap_and_free_tx_resource()
1967 buffer_info->dma = 0; in e1000_unmap_and_free_tx_resource()
1969 if (buffer_info->skb) { in e1000_unmap_and_free_tx_resource()
1970 napi_consume_skb(buffer_info->skb, budget); in e1000_unmap_and_free_tx_resource()
1971 buffer_info->skb = NULL; in e1000_unmap_and_free_tx_resource()
1973 buffer_info->time_stamp = 0; in e1000_unmap_and_free_tx_resource()
1986 struct e1000_tx_buffer *buffer_info; in e1000_clean_tx_ring() local
1993 buffer_info = &tx_ring->buffer_info[i]; in e1000_clean_tx_ring()
1994 e1000_unmap_and_free_tx_resource(adapter, buffer_info, 0); in e1000_clean_tx_ring()
1999 memset(tx_ring->buffer_info, 0, size); in e1000_clean_tx_ring()
2039 vfree(rx_ring->buffer_info); in e1000_free_rx_resources()
2040 rx_ring->buffer_info = NULL; in e1000_free_rx_resources()
2088 struct e1000_rx_buffer *buffer_info; in e1000_clean_rx_ring() local
2095 buffer_info = &rx_ring->buffer_info[i]; in e1000_clean_rx_ring()
2097 if (buffer_info->dma) in e1000_clean_rx_ring()
2098 dma_unmap_single(&pdev->dev, buffer_info->dma, in e1000_clean_rx_ring()
2101 if (buffer_info->rxbuf.data) { in e1000_clean_rx_ring()
2102 skb_free_frag(buffer_info->rxbuf.data); in e1000_clean_rx_ring()
2103 buffer_info->rxbuf.data = NULL; in e1000_clean_rx_ring()
2106 if (buffer_info->dma) in e1000_clean_rx_ring()
2107 dma_unmap_page(&pdev->dev, buffer_info->dma, in e1000_clean_rx_ring()
2110 if (buffer_info->rxbuf.page) { in e1000_clean_rx_ring()
2111 put_page(buffer_info->rxbuf.page); in e1000_clean_rx_ring()
2112 buffer_info->rxbuf.page = NULL; in e1000_clean_rx_ring()
2116 buffer_info->dma = 0; in e1000_clean_rx_ring()
2124 memset(rx_ring->buffer_info, 0, size); in e1000_clean_rx_ring()
2698 struct e1000_tx_buffer *buffer_info; in e1000_tso() local
2738 buffer_info = &tx_ring->buffer_info[i]; in e1000_tso()
2750 buffer_info->time_stamp = jiffies; in e1000_tso()
2751 buffer_info->next_to_watch = i; in e1000_tso()
2768 struct e1000_tx_buffer *buffer_info; in e1000_tx_csum() local
2796 buffer_info = &tx_ring->buffer_info[i]; in e1000_tx_csum()
2807 buffer_info->time_stamp = jiffies; in e1000_tx_csum()
2808 buffer_info->next_to_watch = i; in e1000_tx_csum()
2829 struct e1000_tx_buffer *buffer_info; in e1000_tx_map() local
2837 buffer_info = &tx_ring->buffer_info[i]; in e1000_tx_map()
2872 buffer_info->length = size; in e1000_tx_map()
2874 buffer_info->time_stamp = jiffies; in e1000_tx_map()
2875 buffer_info->mapped_as_page = false; in e1000_tx_map()
2876 buffer_info->dma = dma_map_single(&pdev->dev, in e1000_tx_map()
2879 if (dma_mapping_error(&pdev->dev, buffer_info->dma)) in e1000_tx_map()
2881 buffer_info->next_to_watch = i; in e1000_tx_map()
2905 buffer_info = &tx_ring->buffer_info[i]; in e1000_tx_map()
2925 buffer_info->length = size; in e1000_tx_map()
2926 buffer_info->time_stamp = jiffies; in e1000_tx_map()
2927 buffer_info->mapped_as_page = true; in e1000_tx_map()
2928 buffer_info->dma = skb_frag_dma_map(&pdev->dev, frag, in e1000_tx_map()
2930 if (dma_mapping_error(&pdev->dev, buffer_info->dma)) in e1000_tx_map()
2932 buffer_info->next_to_watch = i; in e1000_tx_map()
2944 tx_ring->buffer_info[i].skb = skb; in e1000_tx_map()
2945 tx_ring->buffer_info[i].segs = segs; in e1000_tx_map()
2946 tx_ring->buffer_info[i].bytecount = bytecount; in e1000_tx_map()
2947 tx_ring->buffer_info[first].next_to_watch = i; in e1000_tx_map()
2953 buffer_info->dma = 0; in e1000_tx_map()
2961 buffer_info = &tx_ring->buffer_info[i]; in e1000_tx_map()
2962 e1000_unmap_and_free_tx_resource(adapter, buffer_info, 0); in e1000_tx_map()
2973 struct e1000_tx_buffer *buffer_info; in e1000_tx_queue() local
3002 buffer_info = &tx_ring->buffer_info[i]; in e1000_tx_queue()
3004 tx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); in e1000_tx_queue()
3006 cpu_to_le32(txd_lower | buffer_info->length); in e1000_tx_queue()
3278 tx_ring->buffer_info[first].time_stamp = 0; in e1000_xmit_frame()
3406 struct e1000_tx_buffer *buffer_info = &tx_ring->buffer_info[i]; in e1000_dump() local
3423 (u64)buffer_info->dma, buffer_info->length, in e1000_dump()
3424 buffer_info->next_to_watch, in e1000_dump()
3425 (u64)buffer_info->time_stamp, buffer_info->skb, type); in e1000_dump()
3448 struct e1000_rx_buffer *buffer_info = &rx_ring->buffer_info[i]; in e1000_dump() local
3462 (u64)buffer_info->dma, buffer_info->rxbuf.data, type); in e1000_dump()
3832 struct e1000_tx_buffer *buffer_info; in e1000_clean_tx_irq() local
3839 eop = tx_ring->buffer_info[i].next_to_watch; in e1000_clean_tx_irq()
3848 buffer_info = &tx_ring->buffer_info[i]; in e1000_clean_tx_irq()
3852 total_tx_packets += buffer_info->segs; in e1000_clean_tx_irq()
3853 total_tx_bytes += buffer_info->bytecount; in e1000_clean_tx_irq()
3854 if (buffer_info->skb) { in e1000_clean_tx_irq()
3855 bytes_compl += buffer_info->skb->len; in e1000_clean_tx_irq()
3860 e1000_unmap_and_free_tx_resource(adapter, buffer_info, in e1000_clean_tx_irq()
3868 eop = tx_ring->buffer_info[i].next_to_watch; in e1000_clean_tx_irq()
3899 if (tx_ring->buffer_info[eop].time_stamp && in e1000_clean_tx_irq()
3900 time_after(jiffies, tx_ring->buffer_info[eop].time_stamp + in e1000_clean_tx_irq()
3921 tx_ring->buffer_info[eop].time_stamp, in e1000_clean_tx_irq()
4136 struct e1000_rx_buffer *buffer_info, *next_buffer; in e1000_clean_jumbo_rx_irq() local
4145 buffer_info = &rx_ring->buffer_info[i]; in e1000_clean_jumbo_rx_irq()
4164 next_buffer = &rx_ring->buffer_info[i]; in e1000_clean_jumbo_rx_irq()
4168 dma_unmap_page(&pdev->dev, buffer_info->dma, in e1000_clean_jumbo_rx_irq()
4170 buffer_info->dma = 0; in e1000_clean_jumbo_rx_irq()
4177 u8 *mapped = page_address(buffer_info->rxbuf.page); in e1000_clean_jumbo_rx_irq()
4206 buffer_info->rxbuf.page, in e1000_clean_jumbo_rx_irq()
4212 buffer_info->rxbuf.page, 0, length); in e1000_clean_jumbo_rx_irq()
4214 e1000_consume_page(buffer_info, rxtop, length); in e1000_clean_jumbo_rx_irq()
4221 buffer_info->rxbuf.page, 0, length); in e1000_clean_jumbo_rx_irq()
4224 e1000_consume_page(buffer_info, skb, length); in e1000_clean_jumbo_rx_irq()
4230 p = buffer_info->rxbuf.page; in e1000_clean_jumbo_rx_irq()
4267 e1000_consume_page(buffer_info, skb, in e1000_clean_jumbo_rx_irq()
4304 buffer_info = next_buffer; in e1000_clean_jumbo_rx_irq()
4323 struct e1000_rx_buffer *buffer_info, in e1000_copybreak() argument
4335 dma_sync_single_for_cpu(&adapter->pdev->dev, buffer_info->dma, in e1000_copybreak()
4357 struct e1000_rx_buffer *buffer_info, *next_buffer; in e1000_clean_rx_irq() local
4366 buffer_info = &rx_ring->buffer_info[i]; in e1000_clean_rx_irq()
4381 data = buffer_info->rxbuf.data; in e1000_clean_rx_irq()
4383 skb = e1000_copybreak(adapter, buffer_info, length, data); in e1000_clean_rx_irq()
4394 dma_unmap_single(&pdev->dev, buffer_info->dma, in e1000_clean_rx_irq()
4397 buffer_info->dma = 0; in e1000_clean_rx_irq()
4398 buffer_info->rxbuf.data = NULL; in e1000_clean_rx_irq()
4407 next_buffer = &rx_ring->buffer_info[i]; in e1000_clean_rx_irq()
4453 if (buffer_info->rxbuf.data == NULL) in e1000_clean_rx_irq()
4477 buffer_info = next_buffer; in e1000_clean_rx_irq()
4504 struct e1000_rx_buffer *buffer_info; in e1000_alloc_jumbo_rx_buffers() local
4508 buffer_info = &rx_ring->buffer_info[i]; in e1000_alloc_jumbo_rx_buffers()
4512 if (!buffer_info->rxbuf.page) { in e1000_alloc_jumbo_rx_buffers()
4513 buffer_info->rxbuf.page = alloc_page(GFP_ATOMIC); in e1000_alloc_jumbo_rx_buffers()
4514 if (unlikely(!buffer_info->rxbuf.page)) { in e1000_alloc_jumbo_rx_buffers()
4520 if (!buffer_info->dma) { in e1000_alloc_jumbo_rx_buffers()
4521 buffer_info->dma = dma_map_page(&pdev->dev, in e1000_alloc_jumbo_rx_buffers()
4522 buffer_info->rxbuf.page, 0, in e1000_alloc_jumbo_rx_buffers()
4525 if (dma_mapping_error(&pdev->dev, buffer_info->dma)) { in e1000_alloc_jumbo_rx_buffers()
4526 put_page(buffer_info->rxbuf.page); in e1000_alloc_jumbo_rx_buffers()
4527 buffer_info->rxbuf.page = NULL; in e1000_alloc_jumbo_rx_buffers()
4528 buffer_info->dma = 0; in e1000_alloc_jumbo_rx_buffers()
4535 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); in e1000_alloc_jumbo_rx_buffers()
4539 buffer_info = &rx_ring->buffer_info[i]; in e1000_alloc_jumbo_rx_buffers()
4570 struct e1000_rx_buffer *buffer_info; in e1000_alloc_rx_buffers() local
4575 buffer_info = &rx_ring->buffer_info[i]; in e1000_alloc_rx_buffers()
4580 if (buffer_info->rxbuf.data) in e1000_alloc_rx_buffers()
4615 buffer_info->dma = dma_map_single(&pdev->dev, in e1000_alloc_rx_buffers()
4619 if (dma_mapping_error(&pdev->dev, buffer_info->dma)) { in e1000_alloc_rx_buffers()
4621 buffer_info->dma = 0; in e1000_alloc_rx_buffers()
4632 (void *)(unsigned long)buffer_info->dma, in e1000_alloc_rx_buffers()
4636 (void *)(unsigned long)buffer_info->dma); in e1000_alloc_rx_buffers()
4638 dma_unmap_single(&pdev->dev, buffer_info->dma, in e1000_alloc_rx_buffers()
4643 buffer_info->rxbuf.data = NULL; in e1000_alloc_rx_buffers()
4644 buffer_info->dma = 0; in e1000_alloc_rx_buffers()
4649 buffer_info->rxbuf.data = data; in e1000_alloc_rx_buffers()
4652 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); in e1000_alloc_rx_buffers()
4656 buffer_info = &rx_ring->buffer_info[i]; in e1000_alloc_rx_buffers()